How can I verify that user name starts with a letter and contains only alphanumeric characters?
问题 I am using Jquery Validation. Currently, I have a username, what i want to validate for this username is: Not blank Availability No whitespaces, I add this method: $.validator.addMethod("nowhitespace", function(value, element) { return this.optional(element) || /^\S+$/i.test(value); }, " No white space please"); Alphanumeric $.validator.addMethod("alphanumeric", function(value, element) { return this.optional(element) || /^[a-zA-Z0-9]+$/i.test(value); }, " Alphanumeric. Only numbers and