Bug #5043 [NEW]: newest version of QuickForm rule does not work on date fields
| From: | lburnerheimerton at yahoo dot com | Date: | Tue, 09 Aug 2005 21:23:54 +0000 |
| Subject: | Bug #5043 [NEW]: newest version of QuickForm rule does not work on date fields | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6620@lists.php.net to get a copy of this message | ||
From: lburnerheimerton at yahoo dot com
Operating system: Win XP
PHP version: 4.3.8
Package: Documentation
Bug Type: Bug
Bug description: newest version of QuickForm rule does not work on date fields
Description:
------------
$form->addElement('date', 'issuedDate', 'Issued Date: ');
....
$form->addRule('dateOnline', 'Please add an Online DATE',
'required',
null, 'server');
Test script:
---------------
<?php
require_once "HTML/QuickForm.php";
$form = new HTML_QuickForm('frmTest', 'get');
$form->addElement('date', 'dateOnline', 'Online Date: ');
$form->addElement('text', 'MyTextBox', 'What is your name?');
$form->addElement('submit', 'btnSubmit', 'Submit');
$form->addRule('dateOnline', 'Please add an ONLINE DATE',
'required',
null, 'server');
if ($form->validate()) {
$form->freeze();
}
$form->display();
?>
Expected result:
----------------
I expect it to process & display the frozen data
Actual result:
--------------
Notice: Array to string conversion in
c:\pear\lib\HTML\QuickForm\Rule\Required.php on line 39
Online Date: 01Jan2001
What is your name?
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=5043&edit=1
--