Welcome Guest, Not a member yet? Register   Sign In
Validation callback
#1

(This post was last modified: 11-20-2017, 08:06 AM by rolly.)

Hi, I have problem.
I get only callback validation.
Why?

PHP Code:
$this->form_validation->set_rules(
            'user_passcurr',
            'current password',
            'trim|required|min_length[6]|max_length[32]|callback_check_passcurr|strip_tags',
            [
            'required' => 'error0',
            'min_length' => 'error1',
            'max_length' => 'error2',
            ]
        ); 

PHP Code:
    public function check_passcurr(string $str)
    {
        if ($this->user_model->passcurr_verify($this->session->user_id$str)) {
            return TRUE;
        } else {
            $this->form_validation->set_message('check_passcurr''Error {field}');
            return FALSE;
        }
    
Reply


Messages In This Thread
Validation callback - by rolly - 11-19-2017, 05:22 AM
RE: Validation callback - by PaulD - 11-19-2017, 07:08 AM
RE: Validation callback - by rolly - 11-20-2017, 08:02 AM
RE: Validation callback - by InsiteFX - 11-20-2017, 05:45 AM
RE: Validation callback - by rolly - 11-20-2017, 07:57 AM
RE: Validation callback - by PaulD - 11-20-2017, 08:17 AM
RE: Validation callback - by rolly - 11-21-2017, 01:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB