On Apr 29, 3:13 pm, MarcS <[EMAIL PROTECTED]> wrote:
> I don't think there's a bug in it.
>
> all I have is this
>
>         var $validate = array(
>                 'name' => VALID_NOT_EMPTY,
>                 'url' => array('rule' => 'url','message' => 'this field must 
> contain a valid url')
>         );

Not a bug per se, just not enough to tell CakePHP that the field is
required. VALID_NOT_EMPTY is a regex and will only be executed if a
value is passed. That's somewhat lame, but here's what you do if you
want it really to be required (just for the name field, you can get
the idea):

var $validate = array(
    'name' => array('rule' => 'alphaNumeric', 'required' => true,
'message' => 'Required')
);

You have to set required=true.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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