Welcome Guest, Not a member yet? Register   Sign In
Form Validation and the bahaviour when the field id NOT required
#4

[eluser]Unknown[/eluser]
I agree with verisof... This seems like a bug to me. I have all my rules in a config file, and would expect that matches[password] would throw an error if password is entered and password2 is left blank.

Instead, form validation succeeds and the password is changed without confirming. (Not good!)


My config file looks something like this:

Code:
$config = array(
'account/settings' => array(
    array(
            'field' => 'email',
            'label' => 'Email',
            'rules' => 'required|valid_email'
         ),
    array(
            'field' => 'password',
            'label' => 'New Password',
            'rules' => 'trim|min_length[6]|max_length[20]'
         ),
    array(
            'field' => 'password2',
            'label' => 'New Password Again',
            'rules' => 'trim|matches[password]|min_length[6]'
         )
    ),                      

);


Messages In This Thread
Form Validation and the bahaviour when the field id NOT required - by El Forum - 07-16-2010, 03:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB