--- Sylvain Wallez <[EMAIL PROTECTED]> wrote:
So what about the following changes:
- when a field isn't marked as required, validators are called even if the value is null,
- validators that need a value to do their job (e.g. regexp, range, email, etc) will return "true" (valid) for a null value
- other validators (such as assert) will behave according to their semantics with null values.
What do you think?
+1 to these changes.
On a related topic, other than because of history, why is "required"
an attribute of the widget rather than an attribute of the validation
element? Conceptually, "required" is part of a form's validation logic.
True. But being required produces a distinguishing display that is not possible if only represented by a validator.
I guess it's the reason. Maybe Bruno could tell us more about this.
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
