Try this:

"psd" => array(
        "minLength" => array(
                "rule" => array("minLength", 5),
                "allowEmpty" => false,
                "message" => "Your message."
         )


On Apr 18, 11:42 am, Almaju <[email protected]> wrote:
> Hi,
> I really don't understand what are the problems with my code, see :
>
> function edit($id = null){
>                 if(isset($this->data)){
>                         $this->User->set($this->data);
>                         if(!$this->User->validates()){
>                                 $this->Session->setFlash(
>                                         Error !',
>                                         'message_erreur'
>                                 );
>                                 return;
>                         }
>
>                                 $this->User->save($this->data, false);
>                                 $this->Session->setFlash(
>                                         'Success.',
>                                         'message_succes'
>                                 );
>                 }
>         }
>
> And the $validate var :
> var $validate = array(
>                 'psd' => array(
>                         'rule' => array('minLength', 5)
>                 ),
>                 'password' => array(
>                         'rule' => array('minLength', 1)
>                 )
>         );
>
> In that cas, if I send a variable "psd" which vault A, it shouldn't
> save the form in the database but it does and I don't understand why
> anyway !
>
> Help me :( !
>
> Thank you :) .
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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