quickform, validation of date element
| From: | Julien Tschäppät | Date: | Sat, 30 Jul 2005 20:07:52 +0000 |
| Subject: | quickform, validation of date element | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20188@lists.php.net to get a copy of this message | ||
Hi,
I have problem to add a rule for a date element
($form->addElement('date', 'testDate', 'Date: ', $options) ). I
tried
with $form->addRule('testDate', 'date required', 'required') but
that
don't work. I saw somewhere that I have to use a GroupRule. I don't
understand how I have to do that. Can someone help me ?
my form :
$form = new HTML_QuickForm('test', 'post');
$options = array('addEmptyOption' => true);
$form->addElement('date', 'testDate', 'Date: ', $options);
$form->addElement('submit', 'submit', 'Test');
Julien