[Html-widget] Behavior of Callback

Ted Carnahan ted at tedcarnahan.com
Fri Oct 6 17:52:33 CEST 2006


We've gone ahead and added a display_errors attribute to CallbackOnce.  
This attribute allows you to specify the number of fields, counting from 
the beginning of the list given to the constraint, for which errors will 
be attached.  Patch is attached.

We have changed our code to use this in a number of places - in fact, 
there were no places where we wanted something other than the first 
option in the list.  Perhaps this approach is wrong, and the error ought 
to be attached, by default at least, to only the first element in the 
constraint's list? 

Bogdan Lucaciu wrote:

>this problem is true for any and equal as well. 
>
The behavior for Any is probably right - highlight all of the missing 
fields if all of them are missing.  For equal, it also makes sense to 
highlight both - because otherwise, which one is right?  But for (most 
uses of?) CallbackOnce, the first field or two are the "important" ones 
and the rest of the fields are just helpers.

- Ted Carnahan
ted at tedcarnahan.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CallbackOnce_display_errors.patch
Url: http://lists.rawmode.org/pipermail/html-widget/attachments/20061006/cfad67b1/attachment.diff 


More information about the Html-widget mailing list