Created
May 2, 2017 15:25
-
-
Save seguelador/81456093f66d9f765c901ef2e17f4782 to your computer and use it in GitHub Desktop.
Method for letters only with accents on Jquery Validation
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( "lettersonly", function( value, element ) { | |
return this.optional( element ) || /^[a-z\s-a-záéíóúý]+$/i.test( value ); | |
}, "Solo letras por favor" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
72737