HTML_QuickForm2 rule chaining

From: Date: Tue, 04 May 2010 16:55:51 +0000
Subject: HTML_QuickForm2 rule chaining
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30506@lists.php.net to get a copy of this message
Hi all, When adding multiple rules to an qf2 element, using the fluent interface does not work anymore - every addRule() call returns the created rule and not the element. I do see that this is needed for further rule modifications or using them in and/or chains, it makes the simple cases more complicated. What about a copy of addRule() that returns the qf element? Instead of > $el = $form->addElement(..); > $el->addRule(...); > $el->addRule(...); > $el->addRule(...); one could use > $form->addElement(..) > ->addRuleE(...) > ->addRuleE(...) > ->addRuleE(...) What do you think about that? -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=-

Attachment: [application/pgp-signature] signature.asc
« previous php.pear.general (#30506) next »