Created
March 10, 2015 14:47
-
-
Save jesusgoku/7c6cd55fac5732374d7e to your computer and use it in GitHub Desktop.
Regexp validator to jQuery Validation Plugins
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.addMethod('regexp', function (value, element, params) { | |
return this.optional(element) || params.test(value); | |
}, 'Por favor, escribe un formato valido.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment