I've met the same problem as this page:
http://www.mail-archive.com/pylons-discuss@googlegroups.com/msg14292.html
This is the main content from there:
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?
From the answers of there, they said it has not been fixed in pylons, but that was several months agao. I wanna if there any solutions for it now?
pylons.decorators.validate(schema=None, validators=None, form=None, variable_decode=False, dict_char='.', list_char='-', post_only=True, state=None, on_get=False, **htmlfill_kwargs)
Note the state
parameter. Full docs here (Pylons 1.0)
精彩评论