pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Form.required - does it have any functionality?
Date Wed, 15 Jun 2011 14:29:01 GMT
> This would only work if all form fields were guaranteed to be TextInputs,
which they are not. 
> There is no way to generically ensure that a "required" field has a value,
> because there is no API in Component such as "hasValue():boolean" (nor do
> I think there should be).
Ok, now I understand ... instead we could write some info inside existing
tutorials on how to use Validators instead (on text inputs and dates, etc).
Maybe I could add a NotEmptyValidator, trivial but could be useful.
Or maybe we could implement (for the 2.1) a way to let application
developers to use a Form method to call all validators of its elements and
collect all results ... what do you think of this ?
Of course be free to delete/rename the issue I just created if you think
this feature could be useful ...

> My opinion is that the "required" property should be eliminated. 
Ok, do you prefer to remove it, or should I do it ? Tell me.
> Even if support were added to TerraFormSkin to paint a "required" state,
> the flag is still likely to cause confusion, since it implies that Form
> will execute some validation logic (which it doesn't). 
Right.
> The definition of "required" is simply too application-specific.
Yes, I agree, my idea was only to try to have a solution to handle only the
first step in data validation, so probably it's not worth the effort.

Thank you for the info,
Sandro



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Form-required-does-it-have-any-functionality-tp3057011p3067538.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Mime
View raw message