cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Larson <timlarsonw...@yahoo.com>
Subject Re: Woody - required vs validation
Date Fri, 22 Aug 2003 14:42:19 GMT
--- Antonio Gallardo <agallardo@agsoftware.dnsalias.com> wrote:
...
> I think you are right the correct approach is:
> 
> A-required="true"  - field cannot be empty (NULL) and must be validated.
> B-required="false" - if (field is not empty) then validate.

Yes, clearly stated.  I thought about this some more and have another issue.
When using multi-field validation, the value in another field may determine
whether or not a field is required.  For this case A should be relaxed to:
  A-required="true"  - field may or may not be empty and must be validated.
Alternately, we could leave A as you stated and add this as a third case:
  C-required="maybe" - field may or may not be empty and must be validated.

If the validation logic is duplicated on the client with javascript, then
the visual indicator of whether a field is required could be dynamically
updated when the fields it depends on are changed.  This could also be
achieved with server-side logic, but would not be quite as dynamic as it
could only update the indicator on posts.

--Tim Larson


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Mime
View raw message