Home » HTML » HTML_QuickForm » Bug #6482
adrule does not work
Details
| Submitted | 2006-01-12 18:43 UTC |
|---|---|
| From | roberto dot braga at yap dot it |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 5.1.1 |
| OS | Linux |
| 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