开发者

jQuery Validation how to get notification when input's error state changes

开发者 https://www.devze.com 2023-03-15 21:04 出处:网络
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 abou

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消