Created
October 25, 2018 17:39
-
-
Save juanlopezdev/546f1ea441e32a5b66d7de8a3f94d99d to your computer and use it in GitHub Desktop.
[Extensiones de validaciones para JQuery Validate] #javascript #jquery #utilidades
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
// Solo caracteres alfanuméricos | |
jQuery.validator.addMethod("lettersonly", function(value, element) { | |
return this.optional(element) || /^[a-z\s]+$/i.test(value); | |
}, "Only alphabetical characters"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment