Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.10

Bug #1154 addRule doesnt work with grouped text fields
Submitted: 2004-04-07 08:23 UTC Modified: 2006-12-26 22:30 UTC
From: schwering at ift-nord dot de Assigned: avb
Status: Closed Package: HTML_QuickForm_Controller
PHP Version: Irrelevant OS: red-hat
Roadmaps: (Not assigned)    
Subscription  


 [2004-04-07 08:23 UTC] schwering at ift-nord dot de
Description: ------------ code is taken from: regWizard.php from QuickForm Controller examples, but seems to be a QuickForm bug. Rule doesnt work, u could enter nothing and no error info comes up. :( so your example is buggy (ive entered all required fields on the first page, on second page ive entered some demo text in fields: your company,your address and city but, no firstname neither lastname) and after clicking finish: action process shows me the array.. without any error.. Reproduce code: --------------- $name[] = &HTML_QuickForm::createElement('text', 'first', 'Firstname', array('size' => 16, 'maxlength' => 63)); $name[] = &HTML_QuickForm::createElement('text', 'last', 'Lastname', array('size' => 16, 'maxlength' => 63)); $this->addGroup($name, 'name', 'Your name :', null, false); $this->addRule('name', 'First and last names are required', 'required'); Expected result: ---------------- after input nothing i expect an error Actual result: -------------- no error is shown after input nothing

Comments

 [2004-04-07 11:33 UTC] avb
In fact it is the error in the example. It should be definitely be addGroupRule() instead of addRule(), since the rule added via addRule() receives the array with the group's values. And this array is not "empty" here even if both its elements are empty. Recategorizing the bug.
 [2004-04-10 04:48 UTC] avb
Fixed in CVS
 [2005-09-05 10:47 UTC] race_cat_scarlett at yahoo dot com
when I go to compose to send A massege my text box dose not work