I came across a problem with TW form validation in the trunk, so I fixed it.
The problem was that toscawidgets have their own validate functions, and therefore do not have a dictionary of validation for each field. Thus, in the _perform_validate method (controllers/decorated.py:20) you must extract the fields from the string that the formencode.api.Invalid returns. If there are no fields, the form attaches the errors to the '_the_form' field. Alternatively, perhaps we should set errors to the string returned by invalid, but I am not sure the right way to handle this atm. Furthermore, if you are used to using TW with pylons without having to have a pesky: class FilteringSchema(Schema): filter_extra_fields = True allow_extra_fields = True validator = FilteringSchema Well, that "feature" is back. Anyway, if someone could apply this patch to the trunk, TG2 users of TW would be highly appreciative. cheers. -chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~----------~----~----~----~------~----~------~--~---
decorated.validator.fix.diff
Description: Binary data