-
-
Save craiem/5245580 to your computer and use it in GitHub Desktop.
Js -> Validate Form
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