89
rated 0 times
[
93]
[
4]
/ answers: 1 / hits: 7051
/ 7 Years ago, thu, april 27, 2017, 12:00:00
I am trying to make a regex that only allows chars A-Z
+ ints 0 - 9
together with dash - and underscore _ but also Japanese chars.
$.validator.addMethod("alphaDash", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9-_]+$/i.test(value);
}, "Username must contain only letters, numbers, dashes or underscores.");
The regex above /^[a-zA-Z0-9-_]+$/
only works for english chars, how can I make it accept japanese chars? Hiragana/Katakana/Kanji
More From » regex