#25360 [NEW]: hierselect failed in the validate

From: Date: Tue, 02 Sep 2003 13:13:01 +0000
Subject: #25360 [NEW]: hierselect failed in the validate
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20990@lists.php.net to get a copy of this message
From: cristianoarnold at yahoo dot com dot br Operating system: Windows 2000 PHP version: Irrelevant PHP Bug Type: PEAR related Bug description: hierselect failed in the validate Description: ------------ When I have a first select option that don't have second select option, then the rule failed to validate and submit the form values to process. Example When I select 'Argentina' (below), that don't have second options (because still he was not inserted in the database) then the hierselect load the second select empty, then I submit the form and the validate failed and process the form. Reproduce code: --------------- $main[0] = "Brasil"; $main[1] = "Argentina"; $secondary[0][0] = "Porto Alegre"; $secondary[0][1] = "Rio de Janeiro"; $form->setDefaults(array('location'=>array(0,1))); $sel =& $form->addElement('hierselect', 'location', 'Location:'); $sel->setMainOptions($main); $sel->setSecOptions($secondary); $form->addElement('submit', 'btnSubmit', 'Submit'); $form->addRule('location', 'Field Required', 'required'); if ($form->validate()) $form->process($function = 'insert', false); $form->display(); Expected result: ---------------- I expect that the rule break and return the message 'Field Required' to second element location too -- Edit bug report at http://bugs.php.net/?id=25360&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25360&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25360&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25360&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25360&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25360&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25360&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25360&r=support Expected behavior: http://bugs.php.net/fix.php?id=25360&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25360&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25360&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25360&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25360&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25360&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25360&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25360&r=gnused

« previous php.pear.dev (#20990) next »