Re: QuickForm Rule CallBack

From: Date: Tue, 24 Feb 2004 07:16:08 +0000
Subject: Re: QuickForm Rule CallBack
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10885@lists.php.net to get a copy of this message
Hi! culley harrelson wrote:
I am trying to find a way to have the error message for a QuickForm Rule determined in CallBack fashion, similar to the rule itself. I would like to be able to call a static method for the rule and have the error message determined by the outcome of that rule. This would allow me to perform several validations in a single callback and set the error message accoring to the rule that failed. Any thoughts on if this is possible and if so how to go about it?
Consider using addFormRule(), the normal Rules are designed to be simple validations that can be chained ine after the other, not multiple validations. http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.addformrule.php

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