PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #6482

adrule does not work

Details

Submitted2006-01-12 18:43 UTC
Fromroberto dot braga at yap dot it
StatusBogus
PackageHTML_QuickForm
PHP Version5.1.1
OSLinux
Roadmaps(Not assigned)

Comments

[2006-01-12 18:43 UTC] roberto dot braga at yap dot it

Description:
------------
Latest pear package (upgraded few minutes ago)
Pear 1.4.6
HTML_QuickForm 3.2.5

Test script:
---------------
<?php
require_once 'HTML/QuickForm.php';

$form = new HTML_QuickForm('scheda','POST', $_SERVER['PHP_SELF']);
$selFontSize=&$form->addElement('hierselect', 'fontSize', 'Size: ', "size=4");
$fontSizeUnit= array("em"=>"em","pt"=>"pt","px"=>"px");
$fontSizeList["em"]= array("0.8"=>"0.8","1"=>"1");
$fontSizeList["px"]= array("8"=>"8","10"=>"10","12"=>"12");
$fontSizeList["pt"]= array("8"=>"8","10"=>"10","12"=>"12");

$selFontSize->setMainOptions($fontSizeUnit);
$selFontSize->setSecOptions($fontSizeList);

$form->addElement('submit', 'Save','Save');
$form->addRule('fontSize',"please, select an Font size and unit", 'required','','client');
$form->display();
?>

Expected result:
----------------
I expect an javascript alert displaying the error message when the user chose the unit but not the size

Actual result:
--------------
No error generated and the form submit