自定义表单验证规则无效
$this->form_validation->set_rules('user', '用户名', 'callback_user_check');
public function user_check() {
if (1 == 1) {
$this->form_validation->set_message('user_check', '%s已存在');
return FALSE;
} else {
return TRUE;
}
}
错误信息不显示,是怎么回事?
视图怎么写的? $this->load->library('form_validation');
页:
[1]