diff options
author | wei <> | 2006-08-29 13:41:36 +0000 |
---|---|---|
committer | wei <> | 2006-08-29 13:41:36 +0000 |
commit | da895b1c97234c9640d94bef0e2027b9fc8a6a66 (patch) | |
tree | 3a39971114d30adb88b95019e2ff83588c506e5a /framework/Web/Javascripts/js/debug | |
parent | 13b256cdf8e3cef810d1b3dcf580be751b94c9fe (diff) |
Fixing ticket #274
Diffstat (limited to 'framework/Web/Javascripts/js/debug')
-rw-r--r-- | framework/Web/Javascripts/js/debug/validator.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/framework/Web/Javascripts/js/debug/validator.js b/framework/Web/Javascripts/js/debug/validator.js index a77b6f42..7a963f82 100644 --- a/framework/Web/Javascripts/js/debug/validator.js +++ b/framework/Web/Javascripts/js/debug/validator.js @@ -756,9 +756,9 @@ Prado.WebUI.TBaseValidator.prototype = return value;
},
- /**
+ /**
* The ControlType property comes from TBaseValidator::getClientControlClass()
- * Be sure to update the TBaseValidator::$_clientClass if new cases are added.
+ * Be sure to update the TBaseValidator::$_clientClass if new cases are added.
* @return mixed control value to validate
*/
getValidationValue : function(control)
@@ -771,11 +771,11 @@ Prado.WebUI.TBaseValidator.prototype = if(control.type == "text")
{
value = this.trim($F(control));
-
- if(this.options.DateFormat)
+
+ if(this.options.DateFormat)
{
date = value.toDate(this.options.DateFormat);
- return date == null ? '' : date;
+ return date == null ? value : date;
}
else
return value;
@@ -1116,7 +1116,7 @@ Prado.WebUI.TRangeValidator = Class.extend(Prado.WebUI.TBaseValidator, return true;
if(typeof(this.options.DataType) == "undefined")
this.options.DataType = "String";
-
+
if(this.options.DataType != "StringLength")
{
var min = this.convert(this.options.DataType, this.options.MinValue || null);
@@ -1129,7 +1129,7 @@ Prado.WebUI.TRangeValidator = Class.extend(Prado.WebUI.TBaseValidator, var max = this.options.MaxValue || Number.POSITIVE_INFINITY;
value = value.length;
}
-
+
if(value == null)
return false;
@@ -1268,10 +1268,10 @@ Prado.WebUI.TDataTypeValidator = Class.extend(Prado.WebUI.TBaseValidator, {
evaluateIsValid : function()
{
- var value = this.getValidationValue();
- if(value.length <= 0)
- return true;
- return this.convert(this.options.DataType, value) != null;
+ value = this.getValidationValue();
+ if(value.length <= 0)
+ return true;
+ return this.convert(this.options.DataType, value) != null;
}
});
|