一、如何使用
引入js文件
rush:xhtml;">
rush:xhtml;">
编写script脚
rush:js;">
$(document).ready(function(){
$("#demoForm").validate({
rules:{
username:{
required:true,// 是否必填
minlength:2,// 最小长度
maxlength:10 // 最大长度
},password:{
required:true,minlength:2,maxlength:16
}
}
});
});