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')
        );

I had a bug in my script which caused both name and url to not be
passed and that's how I noticed that it still validates and just
leaves the fields empty.

On Apr 29, 7:55 pm, jonknee <[EMAIL PROTECTED]> wrote:
> > well my thinking is, if you wanted a field validated, you would have a
> > form field present for it, at which point it would pass this field
> > along for validation
>
> You should never trust your validation to the form values that should
> be coming in from the user (you should never trust *anything* from the
> user). The user could easily not pass form fields and could also
> easily pass values you don't expect.A model with a field marked as
> required should always be required, no matter the circumstances.
>
> Luckily, it appears CakePHP is doing just that. I just tried removing
> a form field for a model that had a required validation and it
> wouldn't save. I changed required=True to required=False and it saved
> just fine.
>
> I think the problem MarcS is having is simply a problem in his
> validation routine. Can you post some code?
--~--~---------~--~----~------------~-------~--~----~
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