RE: [PEAR] [QF] Question regarding registration of rules

From: Date: Wed, 07 Jan 2004 13:42:26 +0000
Subject: RE: [PEAR] [QF] Question regarding registration of rules
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10031@lists.php.net to get a copy of this message
Hi Helgi, > -----Original Message----- > From: Helgi [mailto:helgi@trance.is] > > Is there any possibility to add a object as my defined rule ? > > I have a class and i want to use a function that's in that class to > validate > from in a few forms ( so ofcoz it's best to have the function in one > place for > better update :) ) > > This function works if a take it out of the class and have it > with each > form > ... > But if i try > $form->registerRule('userexists', 'callback', > '$user->userExists'); then > i just > get a error Check out parameter 4 of the HTML_QuickForm::registerRule() method. It allows you to specify the name of the class that the callback function (3rd parameter) belongs to. Regards, Mike C. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________

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