codeigniter form validation callback functions not working
array(
'field' => 'password',
'label' => 'password',
'rules' => 'trim|required|min_length[6]|max_length[100]|xss_clean|prep_for_form|matches[confirm_password]|callback_encrypte_pass'
),
array(
'field' => 'confirm_password',
'label' => 'confirm password',
'rules' => 'trim|required|min_length[6]|max_length[100]|xss_clean|prep_for_form|callback_encrypte_pass'
)
and the encrypte_pass function
public function encrypte_pass($pass) {
return md5($pass);
}
also when i replace callback_encrypte_pass with md5 like that
'rules' => 'trim|required|min_length[6]|max_length[100]|xss_clean|prep_for_form|matches[confirm_password]|md5'
the password still not encrypted