Last active
February 23, 2016 21:15
-
-
Save vendettamit/0104d608cc4089799671 to your computer and use it in GitHub Desktop.
Change default onfocusout and trigger validation for individual form elements while user starts typing in input fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
var $validatr = $('form').data('validator'); | |
var settngs = $validatr.settings; | |
settngs.onkeyup = function (element, eventType) { | |
if (!$validatr.element(element)) | |
{ | |
$(this.currentForm).triggerHandler("invalid-form", [this]); | |
} | |
}; | |
settngs.onfocusout = false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment