thinkphp3.2.3 表单验证 unique报错
<br />protected $_validate = array(<br /> // array(field,rule,message,condition,type,when,params)<br /> // 1 用户不能为空,唯一,至少4个字符<br /> array('username', '', '用户名已存在', 0, 'unique'),<br /> );<br />
在表单输入相同的名字 报SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100' for key 'PRIMARY'
数据库相同的名字的位置,而不是输出错误信息。这是那里错了?
------解决思路----------------------请贴出控制器里处理表单的代码
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn