When a form is posted in my controller, I make the following check:
if(ModelState.IsValid)
If the model is not valid, errors are added to the ModelState. The model is then passed to the view with validation summary.
However, I want to check if the ModelState has errors from inside the jQuery ready handler, so that I can add some additional behavior if the form has errors. Is that possible?
You could spit global javascript variable:
and then: