I get a password from a form and saves it in the database. No problem
there.
My problem is that I want validation to happen. I.e to check that the
username is 6 or more chars.

_snippet from model_
        var $validate = array(
                'email' => VALID_EMAIL,
                'username' => array(
                        'rule' => array(
                                'custom', '/^[0-9a-z\.\-\_\+]+$/i'
                        ),
                        'message' => 'Invalid username syntax'
                ),
                'password' => array(VALID_NOT_EMPTY, array('rule' =>
array('minLength', 6))),
                'passwd' => array(VALID_NOT_EMPTY, array('rule' =>
array('minLength', 6)))
        );


_snippet from controller_
        $password = $sanitize->escape($this->data['User']['password']);
        $this->User->id = $this->Session->read('userid');
        $this->User->password = $password;
        $this->User->save();


/Jacob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to