diff options
author | wei <> | 2006-07-22 01:58:33 +0000 |
---|---|---|
committer | wei <> | 2006-07-22 01:58:33 +0000 |
commit | 846f6328a4b9b777da44b1b077a244a5a8d527ce (patch) | |
tree | c025546b3b46779995378689164f0d7782043932 /framework/Web/Javascripts/prado/validation3.js | |
parent | 9ce14c25940da9162a19ccfd85fb4ba7cce1ef6a (diff) |
add StringLength, multi-byte, check in TRangeValidator
Diffstat (limited to 'framework/Web/Javascripts/prado/validation3.js')
-rw-r--r-- | framework/Web/Javascripts/prado/validation3.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/prado/validation3.js b/framework/Web/Javascripts/prado/validation3.js index 9ee7ed2f..0e765c48 100644 --- a/framework/Web/Javascripts/prado/validation3.js +++ b/framework/Web/Javascripts/prado/validation3.js @@ -1104,11 +1104,20 @@ Prado.WebUI.TRangeValidator = Class.extend(Prado.WebUI.TBaseValidator, return true;
if(typeof(this.options.DataType) == "undefined")
this.options.DataType = "String";
-
- var min = this.convert(this.options.DataType, this.options.MinValue || null);
- var max = this.convert(this.options.DataType, this.options.MaxValue || null);
- value = this.convert(this.options.DataType, value);
-
+
+ if(this.options.DataType != "StringLength")
+ {
+ var min = this.convert(this.options.DataType, this.options.MinValue || null);
+ var max = this.convert(this.options.DataType, this.options.MaxValue || null);
+ value = this.convert(this.options.DataType, value);
+ }
+ else
+ {
+ var min = this.options.MinValue || 0;
+ var max = this.options.MaxValue || Number.POSITIVE_INFINITY;
+ value = value.length;
+ }
+
if(value == null)
return false;
|