CodeIgniter - Unable to access an error message corresponding to your field name Password.(pword_check)

后端 未结 6 1794
予麋鹿
予麋鹿 2020-12-09 21:53

I am a new to codeIgniter and I just got stuck in the very beginning. I am using HMVC extention and while validating I am getting the following error:

Unable

6条回答
  •  粉色の甜心
    2020-12-09 21:55

    xss_clean is no longer part of form validation in Codeingitore 3

    Just remove xss_clean from your validation roul

    $this->form_validation->set_rules('pword', 'Password', 'required|max_length[30]|callback_pword_check');
    

    If you really, really need to apply that rule, you should now also load the Security Helper, which contains xss_clean() as a regular function and therefore can be also used as a validation rule.

    go to application/config/autoload.php :

    $autoload['helper'] = array('security');
    

    Or, before your form validation

    $this->load->helper('security');
    

提交回复
热议问题