#23762 [Opn->Asn]: QuickForm "nonzero" validation regex is wrong
| From: | arnaud@php.net | Date: | Fri, 23 May 2003 09:05:51 +0000 |
| Subject: | #23762 [Opn->Asn]: QuickForm "nonzero" validation regex is wrong | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16633@lists.php.net to get a copy of this message | ||
ID: 23762
Updated by: arnaud@php.net
Reported By: web-php-bugs at sklar dot com
-Status: Open
+Status: Assigned
Bug Type: PEAR related
Operating System: Linux
PHP Version: 5CVS-2003-05-22 (dev)
-Assigned To:
+Assigned To: mansion
Previous Comments:
------------------------------------------------------------------------
[2003-05-22 16:20:47] web-php-bugs at sklar dot com
The "nonzero" validation rule in QuickForm.php matches input to the
regex "^[1-9][0-9]+". This only allows positive numbers >= 10. It
should be "^[1-9][0-9]*" to allow positive numbers starting with 1. For
that matter, it should be "^-?[1-9][0-9]*" to allow negative numbers,
too.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23762&edit=1