Created
March 16, 2015 04:09
-
-
Save adamstraube/a523379514938083ffc0 to your computer and use it in GitHub Desktop.
Detect Unicode Chars in JS regex
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
jQuery.validator.addMethod("alphanumeric", function(value, element) { | |
return this.optional(element) || /[!^\x00-\x80]+/i.test(value); | |
}, "Letters, numbers, and underscores only please"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment