Re: QF 3.2 - regex throwing errors

From: Date: Wed, 05 Nov 2003 17:29:59 +0000
Subject: Re: QF 3.2 - regex throwing errors
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8779@lists.php.net to get a copy of this message
<mikeatwork@ukonline.co.uk> wrote : > Hi, > > Just upgraded to QF 3.2 and appear to be getting a regular expression error > now. > > I defined a rule to check if a postcode entered was valid: > > $this->addRule('postcodeGroup', $this->language['L_InvalidPostcode'], > 'regex', '/[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}/', > 'client'); Maybe because your postcodeGroup is a group ? Send the element declaration so we can check this. > When the form is submitted the validation appears to be executed on the > server side now (why?) and also kicks up the warning: Do you really wonder why we enforce server-side validation ? :) > Warning: preg_match() expects parameter 2 to be string, array given in > /usr/local/lib/php/HTML/QuickForm/Rule/Regex.php on line 61 > Did something major change? I cannot see anything relevant mentioned in the > changes for this version. Please send a test case. Thanks, Bertrand Mansion Mamasam

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