diff options
author | xue <> | 2006-02-22 05:09:29 +0000 |
---|---|---|
committer | xue <> | 2006-02-22 05:09:29 +0000 |
commit | d7c8a56d49200cb46d94403934674d670035ff20 (patch) | |
tree | 94f2b9370333afd15db61916e0b4c6e0049507c9 /framework/Web/UI/WebControls/TCompareValidator.php | |
parent | a5c9d537393a949f5b2d9469505890fa508b92ab (diff) |
cleanup of validators.
Diffstat (limited to 'framework/Web/UI/WebControls/TCompareValidator.php')
-rw-r--r-- | framework/Web/UI/WebControls/TCompareValidator.php | 7 |
1 files changed, 3 insertions, 4 deletions
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:
* - <b>Integer</b> A 32-bit signed integer data type.
- * - <b>Double</b> A double-precision floating point number data type.
+ * - <b>Float</b> A double-precision floating point number data type.
* - <b>Currency</b> A decimal data type that can contain currency symbols.
* - <b>Date</b> A date data type. The format follows the GNU date syntax.
* - <b>String</b> 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))
|