Thank you, but sadly not quite what i'm looking for. I can get the validation to accept and reject successfully without issue. My problem is that the form elements on the front end are not showing the validation errors when validation fails. Any suggestions from anyone?
On Aug 17, 8:08 am, Erhan Abay <[EMAIL PROTECTED]> wrote: > I sometimes use validation library as follows: > > http://paste-it.net/public/a60b176/ > > The logic may help you. > > On Aug 16, 5:49 pm, Donius <[EMAIL PROTECTED]> wrote: > > > Hallo, > > > I'm having some trouble understanding how to pass validation errors > > back to my view with two instances of two different models on a single > > form. I can do this pretty easily with one instance of each model on > > the same form - passing all of the data to Model->set and then > > checking Model->validates seems to set the error data for the view > > (and the form helper) to auto-output the validattion errors we > > encounter. Yay! The form data looks something like this when i do > > it: > > > [Borrower][name] => "Bubba" > > [Borrower][email] => "[EMAIL PROTECTED]" > > [Address][city] => "Graceland" > > [Address][state] => "VA" > > > This works and is great. Swell. However, when i try to enter in the > > next set so that the resultant data looks something like this: > > > [Borrower][0][name] => "Bubba" > > [Borrower][0][email] => "[EMAIL PROTECTED]" > > [Address][0][city] => "Graceland" > > [Address][0][state] => "VA" > > [Borrower][1][name] => "White" > > [Borrower][1][email] => "[EMAIL PROTECTED]" > > [Address][1][city] => "Galveston" > > [Address][1][state] => "TX" > > > I can still validate fine, but the errors don't seem to get back to > > the form helper. I'm not really sure what i'm doing wrong here. I've > > googled and haven't found an example of something quite like this - > > can anyone shed some light or point me somewhere good? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
