Thanks for your reply. My validation has become a little more complicated since yesterday as I am trying to validate 1 field but that field belongs to related model. In that case where should I perform the validation and how would I pass the ID back most effectively.
On Mar 17, 8:50 pm, brian <[email protected]> wrote: > On Tue, Mar 17, 2009 at 4:12 PM,koalakid<[email protected]> wrote: > > > Hi, > > > I am fairly new to cake and I'm making some fixes for a client on a > > CMS tool someone developed for them using cake. I am trying to add a > > custom validation rule on one of the forms but if it fails the ID > > parameter in the URL is being lost and the edit fails to update. > > > Do I have to explicitly pass the ID back along? > > I doubt that validation has anything directly to do with it. I'm > guessing your action/method has an $id as a parameter and the form > action does not include it. If you're using $form->create() can you > post that? Also the method itself. It's possible that it's being set > the first time around but, when validation fails and the form is > re-displayed, the ID var isn't set again. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
