var reg = /^[a-z]+$/; if(reg.test(idNo)){ addError(1, byId("personIdentifyNumber"), "证件号中的字母必须为大写!"); }