summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TRangeValidator.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TRangeValidator.php b/framework/Web/UI/WebControls/TRangeValidator.php
index 36dbcdca..13f5465c 100644
--- a/framework/Web/UI/WebControls/TRangeValidator.php
+++ b/framework/Web/UI/WebControls/TRangeValidator.php
@@ -200,8 +200,8 @@ class TRangeValidator extends TBaseValidator
$minValue=$this->getMinValue();
$maxValue=$this->getMaxValue();
+ $valid=preg_match('/^[-+]?[0-9]+$/',trim($value));
$value=intval($value);
- $valid=true;
if($minValue!=='')
$valid=$valid && $this->isGreaterThan($value, intval($minValue));
if($maxValue!=='')
@@ -228,9 +228,9 @@ class TRangeValidator extends TBaseValidator
{
$minValue=$this->getMinValue();
$maxValue=$this->getMaxValue();
-
+
+ $valid=preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value));
$value=floatval($value);
- $valid=true;
if($minValue!=='')
$valid=$valid && $this->isGreaterThan($value,floatval($minValue));
if($maxValue!=='')