cvs: pear /Validate Validate.php

From: Date: Wed, 29 May 2002 09:31:16 +0000
Subject: cvs: pear /Validate Validate.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4240@lists.php.net to get a copy of this message
cox Wed May 29 05:31:16 2002 EDT Modified files: /pear/Validate Validate.php Log: "Remember an integer or a float can also be negative" - Bertrand Mansion # :-) Index: pear/Validate/Validate.php diff -u pear/Validate/Validate.php:1.5 pear/Validate/Validate.php:1.6 --- pear/Validate/Validate.php:1.5 Wed May 29 04:20:24 2002 +++ pear/Validate/Validate.php Wed May 29 05:31:16 2002 @@ -24,7 +24,7 @@ { $dec_prec = $dec_prec ? "{1,$dec_prec}" : '+'; $dec_regex = $decimal ? $decimal . '[0-9]' . $dec_prec : ''; - if (!preg_match("|^[0-9]+($dec_regex)?\$|", $number)) { + if (!preg_match("|^[-+]?[0-9]+($dec_regex)?\$|", $number)) { return false; } if ($decimal != '.') {

« previous php.pear.cvs (#4240) next »