Created
January 11, 2013 22:44
-
-
Save martinnormark/4514627 to your computer and use it in GitHub Desktop.
Programatically call 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
validate: function () { | |
var form = this.$el.is("form") ? this.$el : this.$el.closest("form"); | |
if (!form.is("form")) { | |
form = this.$el.find("form"); | |
} | |
return form.data().unobtrusiveValidation.validate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment