I have a form that can be filled out, saved, loaded and edited.
When it is downloaded and republished, it probably begins its life. When the field is valid at loading, I want it to be immediately invalidated when it was edited contrary to the rules. What is my question in a nutshell, and I suspect that this is supported by some configuration options, I cannot find.
Currently, it works correctly (as was said above) only after: 1) it has been edited, 2) then the field loses focus while it is valid, 3) then it is edited again. Therefore, in order to visualize errors for a pre-filled form, an additional actual loss of focus is required.
If it is empty at boot (for example, the first visit), it should not show errors.
I already use the following in my structure:
- jQuery.validate ("approved" and the main question of my question)
- jQuery unobtrusive validation adapter for ASP.NET MVC 3
I am not currently running any custom code since the “unobtrusive” adapter initiates the check (but I would be happy to fix this). I tried adding 'form.valid ()' to the page load, but it does not fix the above and actually breaks more stuff.
Thanks, Shannon
source
share