| From | Sent On | Attachments |
|---|
| Subject: | Re: [PEAR] QF 3.2 - regex throwing errors | |
|---|---|---|
| From: | Bertrand Mansion (bman...@mamasam.com) | |
| Date: | Nov 5, 2003 9:29:37 am | |
| List: | net.php.lists.pear-general | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Mike Carter | Nov 5, 2003 8:46 am | |
| Bertrand Mansion | Nov 5, 2003 9:29 am | |
| Mike Carter | Nov 5, 2003 9:36 am | |
| Alexey Borzov | Nov 5, 2003 10:11 am | |
| Bertrand Mansion | Nov 5, 2003 12:18 pm | |
| Mike Carter | Nov 5, 2003 5:13 pm | |
| Mike Carter | Nov 5, 2003 5:19 pm | |
| Alexey Borzov | Nov 5, 2003 11:00 pm | |
| Mike Carter | Nov 6, 2003 1:11 am | |
| Bertrand Mansion | Nov 6, 2003 2:09 am | |
| Alexey Borzov | Nov 6, 2003 2:36 am |
| Subject: | Re: [PEAR] QF 3.2 - regex throwing errors | |
|---|---|---|
| From: | Bertrand Mansion (bman...@mamasam.com) | |
| Date: | Nov 5, 2003 9:29:37 am | |
| List: | net.php.lists.pear-general | |
<mike...@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

