On May 3, 2006, at 11:51 PM, Bernd Dorn wrote:
yes, this should really be fixed up in the default implementation
because interface.Invalid has no registered multiadapter to
you have to raise a WidgetInputError
an example for such an error:
from zope.schema import Datetime,Bool,ValidationError
from zope.app.form.interfaces import IWidgetInputError
u"""From-Date is after To-Date"""
# this is needed to adapt to a view for formlib
Well, you can raise any error from an invariant that
extends...zope.interface.Invalid, maybe? The invariant interface
says what is allowed somewhere in zope.interface.
...I suppose we could have a generic view for Invalid errors that
simply said "This is invalid, try again"? Doesn't seem very useful
You are responsible for making sure you have a reasonable exception
view of an exception you raise. I'm inclined to think that this is a
documentation bug at worst.
Zope3-users mailing list