Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery validate, don't check on keyup

Right now I have a custom callback setup for a custom rule using 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?

like image 493
roflwaffle Avatar asked Dec 28 '22 22:12

roflwaffle


1 Answers

There is an option. See here.

Disables onkeyup validation.

$(".selector").validate({
   onkeyup: false
});
like image 52
Josiah Ruddell Avatar answered Jan 08 '23 19:01

Josiah Ruddell