le 29/05/02 15:37, talist@xxxxxxx à talist@xxxxxxx a écrit :
> Bonjour Bertrand,
>
> Could you please give an example for a validation rule on an ElementGroup.
> All the examples provided perform validation on addElement fields
>
>
>> Can anybody help on setting and "addRule" onto an "addElementGroup"
>> What's wrong with the following code ?
>>
>> // Creates a group of text inputs
>> $areaCode = &HTML_QuickForm::createElement('text', '');
>> $areaCode->setSize(3);
>> $areaCode->setMaxLength(3);
>> $phoneNo1 = &HTML_QuickForm::createElement('text', '');
>> $phoneNo1->setSize(3);
>> $phoneNo1->setMaxLength(3);
>> $phoneNo2 = &HTML_QuickForm::createElement('text', '');
>> $phoneNo2->setSize(4);
>> $phoneNo2->setMaxLength(4);
>> $form->addElementGroup(array($areaCode, $phoneNo1, $phoneNo2),
>> 'Telephone:',
>> 'Phone', '-');
>> $form->addRule('Phone', 'Phone is incomplete', 'required');
I don't think this is implemented yet (Adam, Jason, any ideas ?).
Sorry, you will have to do without groups if you want to use addRule (or
maybe you have some time to implement it ?). I don't have enough time to do
it right now.
Bon courage,
Bertrand Mansion
Mamasam
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|