首页 > 代码库 > jQuery Validate

jQuery Validate

$(‘#validation-form-login‘).validate({
errorElement: ‘div‘,
errorClass: ‘help-block‘,
focusInvalid: false,
rules: {
phone_num: {
required: true,
minlength: 11,
digits:true
//email:true
},
type_id: {
required: true
}
},

messages: {
phone_num: {
required: "请输入手机号",
minlength: "请输入有效手机号格式"
},
type_id: {
required: "请选择生肖"
}
},

jQuery Validate