Have 2 validate arrays and create a function in the model that let you choose.
On Feb 5, 2008 9:59 AM, Matias Lespiau <[EMAIL PROTECTED]> wrote: > Maybe you can create a behavior. That way you control which models has those > validation rules available. > > I don't know how cake's implement the 'on' => 'create' or 'update' rules, > but maybe you can sort of extend that to add more states, like 'on' => > 'logged'. > > Cheers, > > > On Feb 3, 2008 10:13 AM, cronet <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > > > how realising case by case validation ?? (e.g. A form need to validate > > different for a user logged in, or not logged in) > > > > First, I thought about creating two different Models with the > > different validation cases. > > But what about the funcitons I need for the models which I would pack > > in the model itselfs. So I would need to create the same functions in > > both models... Not really DRY... > > In app_model these functions would be available in all models, which i > > don't prefer... > > > > What would be a more elegant way to handle case by case validations ? > > > > Regards, > > Alexander > > > > > > > > > > > > > > > > -- > Matias Lespiau > http://www.gignus.com/ > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
