FormBuilder validation message -- issue / bug?

From: Date: Mon, 07 Jun 2004 17:25:39 +0000
Subject: FormBuilder validation message -- issue / bug?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12972@lists.php.net to get a copy of this message
Hi -- I'm running into a problem that was documented as a bug but seemingly resolved (http://pear.php.net/bugs/bug.php?id=917). Basically, that my validation works but my errors are not printing out -- nor does the form freeze when the data is correct and is updated, so somehow the form object is not getting that info. Here are the settings I'm using: 1. In my test page this is the validation script I have (w extra debug text that correctly prints out): if ($form->validate()) { echo "validated"; $form->process(array(&$fg,'processForm'), false ); $form->freeze(); $do->update(); } else { echo "not validated"; } 2. In my DataObject I have this function: function postGenerateForm(&$form){ $form->addRule('first_name', 'Message!', 'required'); } This function works in that when the data is incorrect the form does not validate and the data does not get updated in the db. But I'm not seeing any of the validation messages -- 3. The relevant section of FormBuilder.php reads: if (method_exists($this->_do, 'postgenerateform')) { $this->_do->postGenerateForm(&$obj); } 4. My allow_call_time_pass_reference is set to on in php.ini. *** I've tried not passing $form by reference ($form) instead of (&$form) in my postGenerateForm function (and tried changing FormBuilder.php to not pass $obj by reference -- which didn't work). Anyway, nothing gets the messages to print. Is this a bug or am I missing something? Thanks -- Sarah

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