OK, I just came across a link to the "on" info in the cookbook (that table of contents needs an overhaul) but it looks like it only works with "single rules per field". Bummer.
And GreyCells gives the lowdown on the options array here: http://teknoid.wordpress.com/2008/09/22/setmerge-and-dynamic-validation-rules/ I'm still wondering if I can get the current action in beforeValidate() though. Otherwise, I guess I have to pass something in the options from the controller. On Sat, Apr 18, 2009 at 2:47 PM, brian <bally.z...@gmail.com> wrote: > I've been hunting around for the best way to have action-based > validation. I know there's an "on" key that may be used but I can't > find anything online about how to use it properly. Anyone know where > it's documented? > > I came across this thread, linked from the FAQ: > > http://groups.google.com/group/cake-php/browse_frm/thread/e2e840434c733cfa/0d03101191f5674a > > I like the method worked out by keymaster but left unsaid is how to > know what the present action is. Nothing in the source jumps out at > me. > > Also, I'm curious about beforeValidate() options param. Once again, a > mysterious options array is available with nary a word on using it. > :-( > > ps: note that keymaster's beforeValidate() is missing the return boolean. > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---