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 13:23 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)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 46 - 34 = ?

 [2004-04-07 13: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


 [2004-04-07 16: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 09:48 UTC] avb
Fixed in CVS
 [2005-09-05 15:47 UTC] race_cat_scarlett at yahoo dot com
when I go to compose to send A massege my text box dose not work