Re: Quickform Validation not occuring
| From: | Alexey Borzov | Date: | Sun, 05 Dec 2004 20:42:51 +0000 |
| Subject: | Re: Quickform Validation not occuring | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16022@lists.php.net to get a copy of this message | ||
Hi,
Adam Hubscher wrote:
After testing, which included placing the addRule statement everywhere I could think of it being read before the form is displayed... adding a little piece of code that returned true whenever the addRule function completed successfully... and even testing if the rule is actually added in the first place, I discovered that although the addRule function is being called and completing successfully, there is no actual rule being added. (this is assuming that the isElementRequired method does in fact check to see if, say, the 'LoginID' textbox is a required form element based upon the form's rules). So in this, I discovered that the form validation... was being validated because there were no rules for it to validate.Most probably you pass the form object into some function not by reference. Therefore the rules are added to the copy of the object and are lost when the function is finished.