PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #4328

Does not handle integers as names in form field values

Details

Submitted2005-05-11 18:18 UTC
Fromkeith at setuplinux dot com
StatusBogus
PackageHTML_QuickForm
PHP Version5.0.3
OSGentoo
Roadmaps(Not assigned)

Comments

[2005-05-11 18:18 UTC] keith at setuplinux dot com

Description:
------------
On various rules/elements of QuickForm they will not work if the name is a integer. So far I've seen this bug on addRule email check, and addElement hidden.

Reproduce code:
---------------
//Should do a email check but dosen't
$key = "10";
$form->addElement('text', "$key", "$name");
$form->addRule("$key", "$name Should contain a valid email", 'email', null, 'client');
$form->addRule("$key", "$name over 32 characters", 'maxlength', 32, 'client');

//Should add a hidden field but dosen't
$form->addElement('hidden', "10", 'NULL');

Expected result:
----------------
It should check for valid email and on the other example it should add a hidden field

Actual result:
--------------
For the addRule email check it dosen't preform the check. For the addElement hidden it dosen't add it to the page