如何验证textbox Name
不包含'@'?
rules: {
Name: {
required: true,
},
Email: {
required: true,
email: true
},
Password1: {
minlength: 6
},
}
答案 0 :(得分:3)
尝试模式规则
rules: {
Name: {
required: true,
pattern: /^[^@]+$/
},
Email: {
required: true,
email: true
},
Password1: {
minlength: 6
},
},
messages: {
Name: {
pattern: 'Name should not contain @'
}
}
演示:Fiddle