Unable to access an error message这个错误在哪里关闭
如题Unable to access an error message corresponding to your field name.
这个错误如何关闭掉 没找到在哪里哎。。。就是自定义表单规则的提示错误的。谢谢大家 config/databases.php 中的 debug 设置为 false 试试 回复 2# Hex
已经是FALSE了 还是不管用 那就是去不掉,只能改源码了。 回复 4# Hex
HEX大大再指点下吧。。。这个着急。。。 结论是:无法去掉。 回复 6# Hex
饿。。。我已经去掉啦 HEX大大 我把所有源代码打开 完了CTFL+F暴力解决了。。。 Unable to access an error message corresponding to your field name
这个信息来自于system/libraries/Form_validation.php文件中的658行。
我遇到这个问题的原因是设置错误信息时的第一个参数与其函数名不一致。
比如
//检查用户名是否存在
function _check_name($name)
{
if($name ==='abc')
{
//set_message()函数中的第一个参数值应该与函数名一致
//$this->form_validation->set_message('check_name','%s 已存在');//错误代码
$this->form_validation->set_message('_check_name','%s 已存在');
return false;
}
return true;
}
页:
[1]