Display an input error as a snippet of text.
There are no attributes in this class.
snippet()
Convert a widget input error to an html snippet
>>> from zope.app.form.interfaces import WidgetInputError >>> class TooSmallError(object): ... def doc(self): ... return "Foo input < 1" >>> err = WidgetInputError("foo", "Foo", TooSmallError()) >>> view = WidgetInputErrorView(err, None) >>> view.snippet() u'<span class="error">Foo input < 1</span>'
The only method that IWidgetInputError promises to implement is doc(). Therefore, other implementations of the interface should also work.
>>> from zope.app.form.interfaces import ConversionError >>> err = ConversionError('Could not convert to float.') >>> view = WidgetInputErrorView(err, None) >>> view.snippet() u'<span class="error">Could not convert to float.</span>'
There are no known subclasses.