2、e="text/javascript">二、默認(rèn)校驗(yàn)規(guī)則(1)required:true??????????????必輸字段(2)remote:"check.php"?????????使用ajax方法調(diào)用check.php驗(yàn)證輸入值(3)email:true?????????????????必須輸入正確格式的電子郵件(4)url:true???????????????????必須輸入正確格式的網(wǎng)址(5)date:true??????????????????必須輸入正確格式的日期(6)dateISO:true?
3、??????????????必須輸入正確格式的日期(ISO),例如:2009-06-23,1998/01/22只驗(yàn)證格式,不驗(yàn)證有效性(7)number:true????????????????必須輸入合法的數(shù)字(負(fù)數(shù),小數(shù))(8)digits:true????????????????必須輸入整數(shù)(9)creditcard:????????????????必須輸入合法的信用卡號(10)equalTo:"#field"??????????輸入值必須和#field相同(11)accept:???????????????????輸入
4、擁有合法后綴名的字符串(上傳文件的后綴)(12)maxlength:5???????????????輸入長度最多是5的字符串(漢字算一個(gè)字符)(13)minlength:10??????????????輸入長度最小是10的字符串(漢字算一個(gè)字符)(14)rangelength:[5,10]????????輸入長度必須介于5和10之間的字符串")(漢字算一個(gè)字符)(15)range:[5,10]??????????????輸入值必須介于5和10之間(16)max:5?????????????????????輸入值不能大于5(17
5、)min:10????????????????????輸入值不能小于10三、默認(rèn)的提示messages:{???required:"Thisfieldisrequired.",???remote:"Pleasefixthisfield.",???email:"Pleaseenteravalidemailaddress.",???url:"PleaseenteravalidURL.",???date:"Pleaseenteravaliddate.",???dateISO:"Pleaseenteravaliddate(ISO)."
6、,???dateDE:"BittegebenSieeing眉ltigesDatumein.",???number:"Pleaseenteravalidnumber.",???numberDE:"BittegebenSieeineNummerein.",???digits:"Pleaseenteronlydigits",???creditcard:"Pleaseenteravalidcreditcardnumber.",???equalTo:"Pleaseenterthesamevalueagain.",???accept:"P
7、leaseenteravaluewithavalidextension.",???maxlength:$.validator.format("Pleaseenternomorethan{0}characters."),???minlength:$.validator.format("Pleaseenteratleast{0}characters."),???rangelength:$.validator.format("Pleaseenteravaluebetween{0}and{1}characterslong."),???
8、range:$.validator.format("Pleaseenteravaluebetween{0}and{1}."),???max:$.validator.format("Pleaseenteravaluelessthanorequalto{0}."),???min: