I\'m writing a custom method for a jQuery plugin:
jQuery.validator.addMethod(\"alphanumeric\", function(value, element) { return this.optional(elemen
You can use regexes in JavaScript:
if( yourstring.match(/^[a-zA-Z0-9]+/) ) { return true }
Note that I used + instead of *. With * it would return true if the string was empty
+
*