[Quickform] custom form rule function issue

From: Date: Thu, 27 Jul 2006 13:05:14 +0000
Subject: [Quickform] custom form rule function issue
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24789@lists.php.net to get a copy of this message
Hi, I've written a custom function to validate my form (using addFormRule). I don't know what to return when some of my elements have a name like tab[elem]. For instance with the following generated html: <input size="30" maxlength="60" id="txt1" name="tab[txt1]" type="text" value="" /> and: function validate_form() { $errors = array(); if($values['tab']['txt1'] == "azerty") { $errors['tab']['txt1'] = "error text"; // doesn't work $errors['tab[txt1]'] = "error text"; // doesn't work } return $errors; } Any idea? thanks damien

Attachment: [application/pkcs7-signature] smime.p7s
« previous php.pear.general (#24789) next »