Hi group, my issue might sound familiar to you, but there is a subtle difference in what has previously been posted to this list (which I have searched throught, of course).
I cannot figure out how to display error messages in a Form which gets
validated by Schema.
I have separated the entirety in a Form, WidgetsList and Schema. The
Form itself utilizies field_for(), error_for() and so on.
This works as expected (error messages get displayed):
@tg.expose(...)
def index(self):
return dict(form=myform)
@tg.expose(...)
@tg.error_handler(index)
@tg.validate(form=myform)
def new(self, **kwargs)
...
And this doesn't work as the above:
@tg.expose(...)
def index(self):
return dict(form=myform)
@tg.expose(...)
@tg.error_handler(index)
@tg.validate(validators=MyFormValidationSchema()) # difference!
def new(self, **kwargs)
...
What must one do to modify the second example to behave like the first
still using a Schema? Are there any hidden variables to set? Does have
error_handler some more parameters?
I know I can access the error messages by tg_errors, but how to tell
the form about it?
Thanks in advance
W-Mark Kubacki
--
Already read:
http://docs.turbogears.org/1.0/SimpleWidgetForm
http://docs.turbogears.org/1.0/ValidateDecorator
http://docs.turbogears.org/1.0/ErrorHandling
smime.p7s
Description: S/MIME Cryptographic Signature

