On Aug 31, 5:43 am, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> krsyoung schrieb:
>
> > What I am trying to do is figure out a way so that the @validate
> > statement knows if it should be calling the simple or complex form for
> > validation.
>
> You might use the 'state_factory' argument to the validate decorator:
>
> http://docs.turbogears.org/1.0/ValidateDecorator
>
> Look at the last comment on the page.
>
> Chrirs

Thanks Diez and Chris,

For the moment the cherrypy.request.params.get('formtype') ==
"complex" method has worked perfectly.  This approach is saving a huge
amount of code and has added very little complexity in terms of funky
if/else statements.  I'll still dig into the state approach (http://
formencode.org/Validator.html#state) to see how I could use it to
achieve the same functionality.

Thanks a million guys!
-Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to