xcnuser 发表于 2012-11-14 20:43:46

自定义表单验证规则无效


$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;
      }
    }

错误信息不显示,是怎么回事?

Hex 发表于 2012-11-16 12:56:10

视图怎么写的?

沉伦在现/pz 发表于 2012-11-16 15:51:48

$this->load->library('form_validation');
页: [1]
查看完整版本: 自定义表单验证规则无效