Thanks guys thats awesome. Got it working without any hitches.

On Oct 6, 7:44 pm, Bert Van den Brande <cyr...@gmail.com> wrote:
> I don't prefer manually changing $validate since this moves the validation
> logic out of the model to the controller. Then if you start using the same
> model in a second controller you need to re-implement the validation logic
> all over again.
>
> Didn't know about the existance of MultivalidatableBehavior .... nice tip !
>
> On Tue, Oct 6, 2009 at 10:35 AM, Dr. Loboto <drlob...@gmail.com> wrote:
>
> > You can change $validate array yourself before save. Or use
> > Multivalidate behavior:
>
> >http://bakery.cakephp.org/articles/view/multivalidatablebehavior-usin...
>
> > On Oct 6, 12:22 pm, "#2Will" <willjbar...@gmail.com> wrote:
> > > Hi all,
>
> > > Is it possible to have different validation for  a form for the same
> > > model, depending on circumstance. ?
>
> > > eg, if a user leavers a comment when not logged in, entering their
> > > email address is required - but when logged in it isn't.   So in the
> > > Admin area, i don't want to require it (because some records won't
> > > have a email address, so the validation will stop me saving changes to
> > > the record) but on the web site, i do.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to