From fd019bf034ef4dbedfc305c77fed0dbd83a732c4 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Tue, 25 Apr 2006 00:27:44 +0000
Subject: Add TListControlValidator. Update client-side validators,
datepicker.js, colorpicker.js. Merge to 3.0 if necessary.
---
framework/Web/UI/WebControls/TDataTypeValidator.php | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
(limited to 'framework/Web/UI/WebControls/TDataTypeValidator.php')
diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php
index 81c23ce4..d78be7bf 100644
--- a/framework/Web/UI/WebControls/TDataTypeValidator.php
+++ b/framework/Web/UI/WebControls/TDataTypeValidator.php
@@ -23,7 +23,6 @@ Prado::using('System.Web.UI.WebControls.TBaseValidator');
* The following data types are supported:
* - Integer A 32-bit signed integer 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.
* - String A string data type.
* For Date type, the property {@link setDateFormat DateFormat}
@@ -46,12 +45,13 @@ class TDataTypeValidator extends TBaseValidator
}
/**
- * Sets the data type (Integer, Float, Currency, Date, String) that the values being compared are converted to before the comparison is made.
+ * Sets the data type (Integer, Float, Date, String) that the values being
+ * compared are converted to before the comparison is made.
* @param string the data type
*/
public function setDataType($value)
{
- $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Integer','Float','Date','Currency','String'),'String');
+ $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Integer','Float','Date','String'),'String');
}
/**
@@ -85,8 +85,6 @@ class TDataTypeValidator extends TBaseValidator
return preg_match('/^[-+]?[0-9]+$/',trim($value));
case 'Float':
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));
case 'Date':
$dateFormat = $this->getDateFormat();
if(strlen($dateFormat))
--
cgit v1.2.3