Re: Validation of related models in cake 1.2
Hi James. Yes I'm sure about the naming, but I didn't thought in explictilly call validates for the related model. Where I do that? In beforeSave of the related model, calling: this->validate(); Thanks very much for help. On 23 abr, 14:25, James K <[EMAIL PROTECTED]> wrote: > I haven't had this problem in 1.2 - even models which are nested > several levels all get picked up by the form helper. Are you sure > you're naming your form elements using the correct dot notation? > Model.RelatedModel.FieldName > > You also have to either explicitly call validates() on each model, or > have your save operations validate. Just validating the parent model > doesn't fire validation on the related models. > > On Apr 23, 4:36 am,ygneo<[EMAIL PROTECTED]> wrote: > > > Hi everybody! > > > I've reading the posts about validation of related models. > > I.E.;http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e... > > > I've the same problem: validation errors of related model doesn't goes > > to the view and Form::error doesn't shows. > > > I've seen in the Trac that have been fixed in 1.1., so, what's the > > problem? I need to use the patch in Controller:render showed in the > > post above??? > > > Thanks a lot! --~--~-~--~~~---~--~~ 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 of related models in cake 1.2
I haven't had this problem in 1.2 - even models which are nested several levels all get picked up by the form helper. Are you sure you're naming your form elements using the correct dot notation? Model.RelatedModel.FieldName You also have to either explicitly call validates() on each model, or have your save operations validate. Just validating the parent model doesn't fire validation on the related models. On Apr 23, 4:36 am, ygneo <[EMAIL PROTECTED]> wrote: > Hi everybody! > > I've reading the posts about validation of related models. > I.E.;http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e... > > I've the same problem: validation errors of related model doesn't goes > to the view and Form::error doesn't shows. > > I've seen in the Trac that have been fixed in 1.1., so, what's the > problem? I need to use the patch in Controller:render showed in the > post above??? > > Thanks a lot! --~--~-~--~~~---~--~~ 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 of related models in cake 1.2
Hi everybody! I've reading the posts about validation of related models. I.E.; http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e27da925f/0e414257fd9e64bb?hl=en&lnk=gst&q=validate+related+models#0e414257fd9e64bb I've the same problem: validation errors of related model doesn't goes to the view and Form::error doesn't shows. I've seen in the Trac that have been fixed in 1.1., so, what's the problem? I need to use the patch in Controller:render showed in the post above??? Thanks a lot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---