[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/schema-_bootstrapfields.py:1.19.2.1
Garrett Smith
garrett@mojave-corp.com
Mon, 28 Jul 2003 19:14:38 -0500
Shane Hathaway wrote:
> On Mon, 28 Jul 2003, Garrett Smith wrote:
>=20
>> Shane Hathaway wrote:
>>>> That said, it annoys me that these distinctions are so subtle -- it
>>>> will be hard for casual developers to grok the implications setting
>>>> required and missing_value.
>>>=20
>>> That seems excessively subtle. Can't we just make the text widget
>>> act differently for required text fields than for non-required text
>>> fields?
>>=20
>> How would it act differently in these two modes?
>=20
> Here's an ASCII chart.
>=20
> Non-empty input Empty or no input
> Required Set the field value Validation fails
> Not required Set the field value Set field value to an empty
> string=20
>=20
> Note that the missing_value doesn't apply in any case.
This does avoid any subtle/odd behavior. It makes me feel a tad uneasy
that the widget is reinterpreting 'required' here. But perhaps this can
be viewed as a separate layer of validation provided by the widget in
the interest of doing what the developer means in the case of a web
form.
-- Garrett