diff options
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/WebControls/TCompareValidator.php | 7 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TCustomValidator.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataTypeValidator.php (renamed from framework/Web/UI/WebControls/TValueTypeValidator.php) | 7 |
3 files changed, 7 insertions, 9 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))
diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php index e92ae828..b72ec344 100644 --- a/framework/Web/UI/WebControls/TCustomValidator.php +++ b/framework/Web/UI/WebControls/TCustomValidator.php @@ -116,7 +116,7 @@ class TCustomValidator extends TBaseValidator * TServerValidateEventParameter class
*
* TServerValidateEventParameter encapsulates the parameter data for
- * <b>ServerValidate</b> event of TCustomValidator components.
+ * <b>OnServerValidate</b> event of TCustomValidator components.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
diff --git a/framework/Web/UI/WebControls/TValueTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index 8b5d7bbc..daaa9b6e 100644 --- a/framework/Web/UI/WebControls/TValueTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -1,6 +1,6 @@ <?php
/**
- * TValueTypeValidator class.
+ * TDataTypeValidator class.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
@@ -16,14 +16,14 @@ Prado::using('System.Web.UI.WebControls.TBaseValidator');
/**
- * TValueTypeValidator class
+ * TDataTypeValidator class
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
* @since 3.0
*/
-class TValueTypeValidator extends TBaseValidator
+class TDataTypeValidator extends TBaseValidator
{
/**
* @return string the data type that the values being compared are converted to before the comparison is made. Defaults to String.
@@ -72,7 +72,6 @@ class TValueTypeValidator extends TBaseValidator case 'Integer':
return preg_match('/^[-+]?[0-9]+$/',trim($value));
case 'Float':
- case 'Double':
return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value));
case 'Currency':
return preg_match('/[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value));
|