I'm having issues with my custom validation method in one of my
models. I'm attempting to save multiple records from a single form at
the same time using Transactions. In my call to saveAll in my
controller, I have also tried setting the 'options'['validate']
parameter to 'only' for testing. What I am attempting to do in my
validation method is to ensure that I am not saving duplicates of
certain fields (user id, week id, and squad id -- but to fail on a
rating field).
Problem # 1:
Validation passes successfully (when it shouldn't) when
'options'['validate'] is set to 'only'. Therefore, I can only presume
that validation also passes on the first loop when
'options'['validate'] is set to 'first'.
Problem # 2:
When validation fails, I am greeted with CakePHP's default error
message: "The {Model} could not be saved. Please, try again." at the
top of my form. My validation settings have 'message' set to
something different than that. I have tried using the form helper to
force the error message to be displayed but with no avail.
Anyone willing to take a look at my code (short model snippet) and
point me in the right direction?
http://pasteit.mysiteonline.org/21
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---