jQuery.validator.addMethod("check_user", function(value, element) {
var check = /^[A-Za-z\s]+$/;
//this.optional(element)如果元素为空并且不需要,则立即返回true。
return this.optional(element) || (check.test(value));
}, '...
6-29 2,806 views
jQuery.validator.addMethod("check_user", function(value, element) {
var check = /^[A-Za-z\s]+$/;
//this.optional(element)如果元素...