Created
July 5, 2015 03:49
-
-
Save bmeredith/0b060b2586695352552b to your computer and use it in GitHub Desktop.
Overriding jQuery Validate
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
$.validator.prototype.checkForm = function () { | |
this.prepareForm(); | |
for (var i = 0, elements = (this.currentElements = this.elements()) ; elements[i]; i++) { | |
if (this.findByName(elements[i].name).length != undefined && this.findByName(elements[i].name).length > 1) { | |
for (var cnt = 0; cnt < this.findByName(elements[i].name).length; cnt++) { | |
this.check(this.findByName(elements[i].name)[cnt]); | |
} | |
} else { | |
this.check(elements[i]); | |
} | |
} | |
return this.valid(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment