开发者

jQuery validate, don't check on keyup

Right now I have a custom callback setup for a custom rule using开发者_C百科 the jQuery Validation Plugin that makes an AJAX request and returns the boolean result. This works fine for the first attempt, so if it is invalid, it displays the error. Any attempt after that is firing the custom callback which leads to multiple AJAX calls, one for each keyup event. Is there any way to disable the automatic firing of the custom callback on every keyup, just for this field?


There is an option. See here.

Disables onkeyup validation.

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜