From d7c8a56d49200cb46d94403934674d670035ff20 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 22 Feb 2006 05:09:29 +0000
Subject: cleanup of validators.
---
framework/Web/UI/WebControls/TCompareValidator.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'framework/Web/UI/WebControls/TCompareValidator.php')
diff --git a/framework/Web/UI/WebControls/TCompareValidator.php b/framework/Web/UI/WebControls/TCompareValidator.php
index 9b8dabd5..6cc9d0e5 100644
--- a/framework/Web/UI/WebControls/TCompareValidator.php
+++ b/framework/Web/UI/WebControls/TCompareValidator.php
@@ -30,7 +30,7 @@ Prado::using('System.Web.UI.WebControls.TBaseValidator');
* of both comparison values. Both values are automatically converted to this data
* type before the comparison operation is performed. The following value types are supported:
* - Integer A 32-bit signed integer data type.
- * - Double A double-precision floating point number data type.
+ * - Float A double-precision floating point number data type.
* - Currency A decimal data type that can contain currency symbols.
* - Date A date data type. The format follows the GNU date syntax.
* - String A string data type.
@@ -61,12 +61,12 @@ class TCompareValidator extends TBaseValidator
}
/**
- * Sets the data type (Integer, Double, Currency, Date, String) that the values being compared are converted to before the comparison is made.
+ * Sets the data type (Integer, Float, Currency, Date, String) that the values being compared are converted to before the comparison is made.
* @param string the data type
*/
public function setValueType($value)
{
- $this->setViewState('ValueType',TPropertyValue::ensureEnum($value,'Integer','Double','Date','Currency','String'),'String');
+ $this->setViewState('ValueType',TPropertyValue::ensureEnum($value,'Integer','Float','Date','Currency','String'),'String');
}
/**
@@ -192,7 +192,6 @@ class TCompareValidator extends TBaseValidator
case 'Integer':
return array(intval($value1), intval($value2));
case 'Float':
- case 'Double':
return array(floatval($value1), floatval($value2));
case 'Currency':
if(preg_match('/[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?/',$value1,$matches))
--
cgit v1.2.3