4 lines
174 B
JavaScript
4 lines
174 B
JavaScript
|
10 years ago
|
$.validator.addMethod("alphanumeric", function(value, element) {
|
||
|
|
return this.optional(element) || /^\w+$/i.test(value);
|
||
|
|
}, "Letters, numbers, and underscores only please");
|