Re: [QuickForm] addFormRule

From: Date: Tue, 26 Aug 2003 16:35:09 +0000
Subject: Re: [QuickForm] addFormRule
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7422@lists.php.net to get a copy of this message
Hi! Justin Hendrickson wrote:
I'm currently using (and very pleased with) QuickForm for all my form display and processing needs, but today, I've run into a new need that would appear to be supported by QuickForm, but doesn't seem to work quite right. I'm trying to use the ->addFormRule () method, but the callback I pass never seems to be called. Here's a sample bit of code to show the basic idea: ... Since there's no documentation available for this function,
http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.addformrule.php
I reviewed the source and it would appear the problem is the validate () function. It seems that the conditionals at the beginning of this method skips the validation of the form if there are no $this->_rules, but there is no check pertaining to the $this->_formRules array. Is this the intended behavior or an oversight?
It's definitely an oversight and will be fixed in the next version. Thanks for reporting!

« previous php.pear.general (#7422) next »