我正在使用jquery validate插件进行表单实时验证
{
//....
rules: {
fullname: {
required: true,
lettersonly: true
},
age:{
required: true,
number: true
}
},
messages: {
fullname: {
required: "Please enter your fullname",
minlength: "fullname must be at least 4 characters long"
},
age:{
required: "Please enter your age",
number : "Your input must be number"
}
}
// ...
}
使用此代码,我正在年龄字段上进行验证,但无法正常工作,或在全名字段上收到任何消息。我在做什么错。