Re: validation strangeness

2010-02-22 Thread Rodrigo Junqueira
I am not sure if it's the same problem i've got, but my issue was due to not respecting naming convention. I missed model naming at plural. Once I got everything to the single, it worked. Hope it helped! On Feb 4, 1:19 am, cricket zijn.digi...@gmail.com wrote: cake_1.2.6 I'm thoroughly

validation strangeness

2010-02-03 Thread cricket
cake_1.2.6 I'm thoroughly confused by what's happening (or not happening) with my validation. For one thing, save() does not appear to be calling validate(). Even when I pass true as the 2nd param, validation does not occur. Secondly, the validation, when called explicitly, seems to be wrong.

Re: validation strangeness

2010-02-03 Thread cricket
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 site http://cakeqs.org and help

Re: validation strangeness

2010-02-03 Thread Jeremy Burns
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 in

Re: validation strangeness

2010-02-03 Thread cricket
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