tp5验证器找不到表单
php吧
全部回复
仅看楼主
level 1
方式为动态调用验证器
1.validate/Cate.php的代码
2. Cate.控制器下edit操作启动验证
3.报错。 和我的数据库/表信息 库名:tpblog表名。tp_cate。而且在database.php有配置过前缀,库名阿.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
我自己测试的时候: 只要把验证器中的unqiue删掉就啥事没有,所以问题应该在unqiue上。
猜测是 'catename = require|unqiue:cate,catename'这段代码,系统找不到路径?
还是我的验证器定义出错了?
2018年04月02日 02点04分 1
level 13
楼主工作了吗
2018年04月02日 03点04分 2
没有啊 在校自学
2018年04月02日 03点04分
level 1
自顶
2018年04月02日 05点04分 3
level 7
这一看就是你的表名写错了啊!
2018年04月02日 05点04分 4
库名tpblog,表名tp_cate,不知道怎么写进去啊
2018年04月02日 05点04分
level 1
自定
2018年04月02日 07点04分 5
level 7
发你的控制器代码啊
2018年04月02日 08点04分 6
补上了
2018年04月02日 11点04分
level 1
2018年04月02日 11点04分 7
level 1
真心求解。看了完全手册,unique规则,
2018年04月02日 14点04分 8
level 7
控制室代码
2018年04月03日 00点04分 9
上边发了啊
2018年04月03日 01点04分
level 1
楼主解决问题了嘛?我也出现了和你一样的问题[狂汗]
2019年09月23日 12点09分 10
我找到了,unique得写成unique:cate,后面得cate就是表名
2019年09月23日 12点09分
1