Re: validation conflicts: two forms, one model, one page
It's a workaround, but did the trick: $('#FormName .error-message').hide() -- View this message in context: http://n2.nabble.com/validation-conflicts%3A-two-forms%2C-one-model%2C-one-page-tp1370230p1382883.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: validation conflicts: two forms, one model, one page
Hmm... the Auth component sets the flash message "Message.auth" and checks for it in the view: if ($session->check('Message.auth')) { $session->flash('auth'); } Maybe you can do something similar? http://book.cakephp.org/view/564/Displaying-Auth-Error-Messages On 23-Oct-08, at 7:24 PM, RyOnLife wrote: > > > I have a single page which contains both a login and a registration > form, > both post to the 'User' model. When the 'username' field in the > registration > form has a validation error, Cake shows the message on the > 'username' field > in the registration form and the 'login' form. How can I contain the > error > message to the appropriate form? > -- > View this message in context: > http://www.nabble.com/validation-conflicts%3A-two-forms%2C-one-model%2C-one-page-tp20141502p20141502.html > Sent from the CakePHP mailing list archive at Nabble.com. > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
validation conflicts: two forms, one model, one page
I have a single page which contains both a login and a registration form, both post to the 'User' model. When the 'username' field in the registration form has a validation error, Cake shows the message on the 'username' field in the registration form and the 'login' form. How can I contain the error message to the appropriate form? -- View this message in context: http://www.nabble.com/validation-conflicts%3A-two-forms%2C-one-model%2C-one-page-tp20141502p20141502.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---