开发者

How can I stop Jquery Validator validating each field automatically?

开发者 https://www.devze.com 2023-03-16 01:06 出处:网络
I only want to validate the elements on a for开发者_运维问答m when I save the form. So I call this directly. Is there a way I can stop the validator validating each filed as its changed.

I only want to validate the elements on a for开发者_运维问答m when I save the form. So I call this directly. Is there a way I can stop the validator validating each filed as its changed.

Thanks Scott


If you are using this validation plugin, then this should do the trick:

$(".selector").validate({
   onfocusout: false
});

This tells the valididation plugin to not validate on focusout. There are a bunch of options that you can pass to the plugin to get it to behave differently.

0

精彩评论

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