I have two MVC edit forms where range validation works perfectly, highlighting as soon as you click away from a text box containing an out-of-range value.
But I have a third edit form where, for some reason, range validation is only working when I click the submit button, but not when I just click elsewhere away from the out-of-range text box. Any idea what might cause that?
I have the Ranges, like [Range(0, 4)] specified in a supplemental partial class to avoid the auto-generation. I have the range text included in the edit view form, like:
@Html.ValidationMessageFor(model => model.G, "0 (Lowest) to 4 (Highest)", new { @class = "text-danger" })
What I have tried:
Not sure at this point what to try. The faulty edit view appears to be set up the same as the good ones.