yeah I guess I'll have to do that.
But it doesn't make much sense to me that cake will save records even
though validation rules say that the field shouldn't be empty.
There ought to be an option which would force it to validate all
fields, including those that have not been passed.

On Apr 29, 6:52 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Cake only validates the fields you're passing to it, so since there is
> no 'b' in your data save, it's not being validated
>
> As far as I know it still works this way in 1.2; but I could be wrong;
> try passing array('a'=>'food', 'b'=>'')
>
> On Apr 29, 1:50 pm, MarcS <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm wondering whether the following is desired behaviour or it is a
> > bug.
>
> > let's say a table has 2 columns a and b. B is required.
> > when I do
> > $this->Model->save('a' => 'foo');
> > the record validates even though a is required. It seems like fields
> > that are not included in the data passed to save() are just ignored.
> > Is that supposed to be that way? Wouldn't make much sense to me
>
> > Marc
--~--~---------~--~----~------------~-------~--~----~
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