thinkphp自动验证错误

浏览:732 发布日期:2015/11/20 分类:求助交流 关键字: 自动验证
        array('username', 'require', '用户名不能为空', 0, 'regex', 3),
        array('password', 'require', '密码不能为空', 0, 'regex', 1),
        array('captcha', 'require', '验证码不能为空', 0, 'regex', 1),
        array('role_id', 'require', '角色不能为空', 0, 'regex', 3), 
        array('username', '', '已存在的用户名', 0, 'unique', 1),
表单只有username,password,captcha三个字段,后面role_id,username是增加数据时验证的。 可是为什么最后一个username唯一验证会生效呢? 它的最后一个参数是明明是1,表示插入数据时才验证啊!
最佳答案
评论( 相关
后面还有条评论,点击查看>>