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

Steve Alexander steve@z3u.com
Tue, 29 Jul 2003 10:28:05 +0300


>>>That seems excessively subtle.  Can't we just make the text widget act
>>>differently for required text fields than for non-required text
>>>fields? 
>>
>>How would it act differently in these two modes?
> 
> Here's an ASCII chart.
> 
>                  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
> 
> Note that the missing_value doesn't apply in any case.
> 

Here's a different ASCII chart that includes my fancy "N/A" feature 
where a user can enter something that looks like "N/A" into a text 
widget to indictate that it is missing.


                 Non-empty input      Empty or no input   Matches "N/A"-like
                                                          regex

  Required       Set the field value  Validation fails    Validation fails

  Not required   Set the field value  Set field value to  Set field to
                                      an empty string     missing_value


I don't think this is an important feature for text widgets in general. 
I include it here to illustrate where the missing_value comes in.

--
Steve Alexander