jump to navigation

Using Formencode for Real-World Code January 17, 2011

Posted by PythonGuy in Advanced Python, Formencode, Pylons.
add a comment

Formencode is nice and pretty, and fun to use. However, even the author admits there are problems. While it does really well with trivial things, more complicated things get complicated fast.

In my own real-world usage, I’ve tried to tame Formencode. I’ve found that taming it is quite difficult. Instead, it’s better to simply fall back to more primitive methods of form validation.

That’s not to say the code in Formencode isn’t useful, even when falling back! No, I still use Formencode’s beautiful Email validator, even in the most complex forms. Here’s an example how: