javascript - What changes to DOM are made when MVC Validation triggers? -
I have a form in a modal window which is currently showing some validity (I am using ASP.NET MVC, I am using JQI UI, AJAX form, data annotations and humorous)
When this validation triggers, I have seen it so far that it does some things:
1: My Validation Summary from 2: My friend A class has been added to the valid input, which is called 3: My verification messages to their class But there is something else that is doing it and I'm not doing this to work Used to be. I is a text box which requires I can select inside this box before triggering verification, then select the second box and the verification will be silent. But as soon as I have an empty text box, I can select the text box and write something to remove the verification immediately, but if it is clear the hen and select a different box. The error has been re-applied without resubmitting. So my question is: what has changed, how does it know that I have already tried to submit? When confirmed, it adds a class for each input / class that must be valid . When the input / selection is not valid, then it adds a class for input / selection: when It is valid, it adds: Validation only sets fire on control when you change the value, Not when the focus loses. Verification fire on change, even before you submit the form. Take a required textbox, add a value for it, and close the tab ... then go back and delete that value, and you should see the text box in red. .validation-summary-errors
.input-validation-error
.field -validation-valid
.field-validation-error
class = "input-validation-error"
class = "valid"
Comments
Post a Comment