【发布时间】:2013-09-27 03:23:02
【问题描述】:
我已经进行了电子邮件验证。
$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email|callback_email_check');
function email_check($str)
{
if (stristr($str,'@uni-email-1.com') !== false) return true;
if (stristr($str,'@uni-email-2.com') !== false) return true;
if (stristr($str,'@uni-email-3.com') !== false) return true;
$this->form_validation->set_message('email', 'Please provide an acceptable email address.');
return FALSE;
}
提交我的表单后,它显示“无法访问与您的字段名称对应的错误消息。”我的代码有问题吗?
【问题讨论】:
标签: php forms codeigniter validation