"Use @validate for validating forms and validators"

I'm a bit hazy on how form validation in TG is supposed to work.  I'm
using widgets so that I can reuse form elements and trying to couple
validators with the elements.  Just now I got this error:

NotImplementedError: Method create has no applicableerror handler for
validation errors.

which is related to this discussion thread.  The method called looks
like this:

def create(self, **data):

Maybe I'll see things differently as I understand more, but right now
creating forms with validation is too difficult.  It should be simple
to create a form with some simple validation and the controller should
redisplay the form with error text when validation fails.  This should
be easily done without stacking decorators on a method.  Once a form
widget is defined including valdation the controller shouldn't need to
have any validation logic.

Then again, I may not know what I'm talking about.  Would be nice to
see an example using widgets with validators and the current error
handling mechanisms.

Reply via email to