Welcome Guest, Not a member yet? Register   Sign In
CI 3 + HMVC form_validation library problem
#1

(This post was last modified: 02-02-2015, 02:08 PM by geekita.)

I have this couple of rules

PHP Code:
$this->form_validation->set_rules('password''New Password''callback__check_password');
$this->form_validation->set_rules('confirm_password''Confirm new password''matches[password]');

...

public function 
_check_password($password) {
    $result = empty($password) || (strlen($password) >= 10);

    if ($result === FALSE) {
        $this->form_validation->set_message('_check_password''MESSAGE ERROR');
    }

    return $result;


and I receive this message on form submit: 'Unable to access an error message corresponding to your field name New Password.'
Even if I use a callback like this

PHP Code:
public function _check_password($password) {
 
   $this->form_validation->set_message('_check_password''MESSAGE ERROR');

 
   return TRUE // or FALSE;


I get same error.
Reply


Messages In This Thread
CI 3 + HMVC form_validation library problem - by geekita - 02-01-2015, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB