I did debug the data; it was fine. My usual first strategy also :-)

The answer was 'on' => 'create', not 'add'.

On Feb 4, 12:32 am, Jeremy Burns <jeremybu...@me.com> wrote:
> This might not be the answer you are looking for, but when I have had similar 
> issues before I have always debugged $this->data at various points to see 
> what is actually being validated and saved. Then I double check the shape of 
> the data against the save (and if necessary, saveAll) functions 
> inhttp://book.cakephp.org/view/75/Saving-Your-Datahere. Sometimes I have 
> found that the shape of the array is not what is expected.
>
> Jeremy Burns
>
> On 4 Feb 2010, at 04:25, cricket wrote:
>
> > Oops. I messed up the call to validate(). But, when I do ...
>
> > if ($this->User->create($this->data) && $this->User->validates())
> > {
> >    if ($this->User->save($this->data, true))
> >    {
>
> > ... validation passes! It should fail. WTF?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to