【发布时间】:2009-11-12 13:51:34
【问题描述】:
我使用 JQ - 验证插件来验证我的表单。但是我不知道jquery中有什么样的验证规则!你能给我推荐一个可以阅读规则的页面吗?
我有两个字段,NAME 和 AGE,我希望它验证 REQUIRED、MAXLENGTH、NUMBER /CHAR、MIN、MAX
rules: {
new_name: {
required: true,
maxlength: 30,
**number: false //?? I dont want to allowd numbers, only alphabetic chars.**
},
new_age: {
required: true,
maxlength: 3,
**chars: false //?? I dont want to allowd numbers, only alphabetic chars.**
**min: 1 // 1 is the lowest number what they allowed**
**max: 30 // 120 is the highest number what they allowed**
},
不写自己的规则可以吗?
谢谢。
【问题讨论】:
标签: php jquery validation