开发者

How can I stop Jquery Validator validating each field automatically?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜