Question

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?

Was it helpful?

Solution

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top