summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/source
diff options
context:
space:
mode:
authorChristophe.Boulain <>2010-01-14 10:46:30 +0000
committerChristophe.Boulain <>2010-01-14 10:46:30 +0000
commit4bc4865df8316152f758219395627618865ba80f (patch)
treedb949206d1e1665ccafb3a6d442e5d62eb49644b /framework/Web/Javascripts/source
parent9d3b70421ecdd129bfe32326ba0987ce6425f4f6 (diff)
Merge changes done in trunk in r2708
Diffstat (limited to 'framework/Web/Javascripts/source')
-rw-r--r--framework/Web/Javascripts/source/prado/validator/validation3.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js
index 4e799677..afec8e15 100644
--- a/framework/Web/Javascripts/source/prado/validator/validation3.js
+++ b/framework/Web/Javascripts/source/prado/validator/validation3.js
@@ -1104,7 +1104,7 @@ Prado.WebUI.TBaseValidator.prototype =
* @param {optional element} control - Control to get value from (default: this.control)
* @return Control value to validate
*/
- getValidationValue : function(control)
+ getRawValidationValue : function(control)
{
if(!control)
control = this.control
@@ -1132,7 +1132,7 @@ Prado.WebUI.TBaseValidator.prototype =
case 'THtmlArea':
if(typeof tinyMCE != "undefined")
tinyMCE.triggerSave();
- return this.trim($F(control));
+ return $F(control);
case 'TRadioButton':
if(this.options.GroupName)
return this.getRadioButtonGroupValue();
@@ -1140,9 +1140,26 @@ Prado.WebUI.TBaseValidator.prototype =
if(this.isListControlType())
return this.getFirstSelectedListValue();
else
- return this.trim($F(control));
+ return $F(control);
}
},
+
+ /**
+ * Get a trimmed value that should be validated.
+ * The ControlType property comes from TBaseValidator::getClientControlClass()
+ * Be sure to update the TBaseValidator::$_clientClass if new cases are added.
+ * @function {mixed} ?
+ * @param {optional element} control - Control to get value fron (default: this.control)
+ * @return Control value to validate
+ */
+ getValidationValue : function(control)
+ {
+ value = this.getRawValidationValue(control);
+ if(Object.isString(value))
+ return this.trim(value);
+ else
+ return value;
+ },
/**
* Get value of radio button group
@@ -1686,7 +1703,7 @@ Prado.WebUI.TRegularExpressionValidator = Class.extend(Prado.WebUI.TBaseValidato
*/
evaluateIsValid : function()
{
- var value = this.getValidationValue();
+ var value = this.getRawValidationValue();
if (value.length <= 0)
return true;