By default, the jQuery validation plugin attaches validation handlers for the focusin , focusout and keyup .
One of our checks makes a (synchronous) request for some data. I want this check to be triggered only when the form is submitted, and not during user input.
I know that this can be changed for the whole form , but this is not what I am looking for.
Is there a way to dynamically disable key verification for 1 element?
Update 1 :
I forgot to mention that I use an unobtrusive check . So I don't think @Mario Johnathan's answer is not an option.
Update 2 : I tried the following things ($ element is the element on which I want to change the validation behavior):
$element.validate({focusout: false, keyup: false});$element.keyup(function() { return false; });$element.off('keyup');$element.unbind('keyup');
javascript jquery javascript-events jquery-validate unobtrusive-validation
Tweezz
source share