Afternoon all,
I'm trying to do some validation in my controller, and if it fails, i
call $this->XYZ->invalidate("field") BEFORE i then attempt to save the
posted data.
Now it seems to me like it resets the validationErrors in the model
when it calls save, so my invalidate() call does no good whatsoever.
In other words, the cake validation is checking for VALID_NOT_EMPTY
and thats fine, but i want my own validation to work and leave the
field invalidated at the point at which cake does its thing in
save().
I am not using tagErrorMsg or whatever it is called becasue i don't
lik this method, iff i had to do many checks then in my views i would
have to have loads of these PHP calls, if i stick errors in an array
with my own code, i can then just loop through them and do what i want
with them.
So i guess i'm asking (in a roundabout kind of way!!) if i can get
save() to stop clearing the validationErrors so that the invalidate()
has stuck (my duplicate field check) when it calls save().
I hope this makes sense :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---