Try 'rule' => array('notEmpty')
On Thu, Jun 4, 2009 at 12:13 PM, Michael <[email protected]> wrote:
>
> So I am trying to set up some validation rules for my users model but
> the validation rules doesn't seem to have any effect on the
> submission. With blank fields, the submission goes though and a new
> record gets created with everything being blank except the password
> which is hashed from the Auth component being used. Here is my
> validation rule:
>
>
> var $validate = array(
> 'username' => array(
> 'rule' => array('minLength', 1),
> 'required' => true,
> 'allowEmpty' => false,
> 'message' => 'Username cannot be empty'
> )
> );
>
>
> This should stop the record from being created right? Any ideas what I
> am doing wrong?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---