On Sun, Oct 4, 2009 at 11:09 AM, DavidG <[email protected]> wrote: > > Does either Django forms or WTForms support chained validators a la > FormEncode? I find this a very useful feature.
You can have a list of validators per field. I'm not sure if you can have a list of post-validators for the form, but there are methods you can override to customize form validation , which I think would give you the equivalent. > Both solutions look really nice - I wonder what the advantages/ > disadvantages to using WTForms are, compared to FormEncode/htmlfill? I > never had much luck with @validate, so handling the details of form > logic has always been a bear with the current patterns. It looks like WTForms is adequate for everyday use but it has some missing features for advanced situations. One is a "ForEach" construct for repeatable groups of fields. Another is field names that aren't valid Python identifiers. (formencode.schema has a 'fields' dict for these.) It definitely has a learning curve because the way you build forms is different, the validator syntax is different, and the way you nest group fields is different. But it looks simpler than ToscaWidgets. -- 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 -~----------~----~----~----~------~----~------~--~---
