#23762 [Asn->Csd]: QuickForm "nonzero" validation regex is wrong

From: Date: Fri, 23 May 2003 09:31:07 +0000
Subject: #23762 [Asn->Csd]: QuickForm "nonzero" validation regex is wrong
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16635@lists.php.net to get a copy of this message
ID: 23762 Updated by: mansion@php.net Reported By: web-php-bugs at sklar dot com -Status: Assigned +Status: Closed Bug Type: PEAR related Operating System: Linux PHP Version: 5CVS-2003-05-22 (dev) Assigned To: mansion New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. 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

« previous php.pear.dev (#16635) next »