jQuery Validation how to get notification when input's error state changes
I am using jQuery Validation in conjunction with MVC3 and its unobtrusive stuff. I want to get javascript callback notification when any field's error state changes. That is to say I want to know about it if a field goes from valid to invalid or vice versa.
Specifically, I have a form that is broken up into s开发者_运维百科ections using a jQuery UI accordion and I want to add / remove an error class to the accordion header line when fields inside the accordion panel are marked as invalid.
You could try the highlight/unhighlight methods. These are called to mark a field valid or invalid. Another option is the success and showErrors "pair", however these two have quite different parameters.
精彩评论