Re: RE: HTML/QuickForm: Setting rules for Groupelements
| From: | Bertrand Mansion | Date: | Fri, 07 Jun 2002 09:04:52 +0000 |
| Subject: | Re: RE: HTML/QuickForm: Setting rules for Groupelements | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1603@lists.php.net to get a copy of this message | ||
le 7/06/02 1:06, Greg Gilbert à greg@treke.net a écrit :
> * Bertrand Mansion (bmansion@mamasam.com) wrote:
>> You can't validate against groups in QuickForm. You are the second person
>> who's asking for that. It might be implemented some day as I see it can be
>> useful. For now, just make a single textfield of your group.
>
> I'd also like to see this, or even better, a way to use multiple
> elements in a validation rule for a single element. For example,
> using an items text field, term text field, and borrower text field
> as seperate fields, but needing all of that data to validate the
> items field.
Ok. I think this can be done but there are many ways to validate against a
group of elements. For instance, you can choose to validate against a
concatenation of all the elements, this is useful for phone numbers. Or you
can choose to validate against a sum of elements, this is useful for an
invoice. Or you can choose to validate all group elements separately, this
is useful for a first-lastname group. And there are probably others.
How do you think this problem can be solved elegantly ?
Bertrand Mansion
Mamasam