On Tue, Apr 20, 2010 at 7:01 AM, astroboy <[email protected]> wrote:
> I am using formencode to validate my forms, and I've stumbled upon a
> problem.
> When using tha validator inside the controller action, I call
> to_python() and I can pass the state variable with any information I
> need to the validators.
> Is it possible to do the same with the validate decorator?

No, that's a limitation of the @validate decorator. Calling .to_python
yourself in the action is the way to go. We looked into splitting up
@validate to make it more flexible but it was too much work for Pylons
1.0. The following ticket outlines some ideas that may be taken up in
later versions.

http://pylonshq.com/project/pylonshq/ticket/405

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to