Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Validation callback

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

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>