Re: QFAMS with QF 3.2.5
| From: | Laurent Laville | Date: | Wed, 14 Sep 2005 13:59:33 +0000 |
| Subject: | Re: QFAMS with QF 3.2.5 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39817@lists.php.net to get a copy of this message | ||
Hi Alexey,
Alexey Borzov wrote:
Hi, Laurent Laville wrote:I've tried with $form->addGroupRule('fruit', 'At least one fruit is required', 'required', null, 1); rather than $form->addRule('fruit', 'At least one fruit is required', 'required'); and it works better. Ok i copy, and now i'll use addGroupRule() on each custom elements even if they are not group, created by addGroup(). will updates my examples and all stuff related now.Recently, i've worked again with QFAMS 1.0 and Opera 8, and discovered the bad new (see pear.general mailing list), but also find that my custom example 4 [1] raise a notice error. "Notice: Array to string conversion in [...]HTML\QuickForm\Rule\Required.php on line 39" I've investigated to see that origin of change (since QF 3.2.5) is to solve bug #3865 ( http://pear.php.net/bugs/bug.php?id=3865 ) My Question: 1. Is my example a bad implementation ? i used addRule() for a QFAMS element; see especially line 115 [2]Since your element is effectively a version of multiselect, you should use the addGroupRule() method. I believe it was covered somewhere...
Thanks for reply Laurent2. Is it a wrong fix that does not allow such array (single/not in group) element ? [3]The fix just makes the mistake obvious by doing the explicit conversion instead of implicit.