[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/schema -_bootstrapfields.py:1.19.2.1

Tres Seaver tseaver@zope.com
28 Jul 2003 15:00:31 -0400


On Mon, 2003-07-28 at 14:46, Garrett Smith wrote:

> I think we're into implementation details here, but I would say that the
> widget shouldn't know/care about a field's constraints -- the field
> should handle its own validation, raising errors based on what the
> widget provides. I.e. if a widget supports 'missing', then it should try
> to update the field with field.missing_value, regardless of the field
> constraints.

Integrity requires the field to enforce its own constraints, and report
errors appropriately;  usability may require the widget to "help" the
user (proactively) avoid violating them, e.g. via clever Javascript
hackery.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com