summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/base/validators.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/base/validators.js')
-rw-r--r--framework/Web/Javascripts/base/validators.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/framework/Web/Javascripts/base/validators.js b/framework/Web/Javascripts/base/validators.js
index f281c87e..99d6b416 100644
--- a/framework/Web/Javascripts/base/validators.js
+++ b/framework/Web/Javascripts/base/validators.js
@@ -27,13 +27,10 @@ Prado.Validation.TEmailAddressValidator = Prado.Validation.TRegularExpressionVal
Prado.Validation.TCustomValidator = function()
{
- var trim = Prado.Validation.Util.trim;
- var value = isNull(this.control) ? '' : trim(Form.Element.getValue(this.control));
- var valid = true;
+ var value = isNull(this.control) ? null : $F(this.control);
var func = this.attr.clientvalidationfunction;
- if (isString(func) && func != "")
- eval("valid = (" + func + "(this, value) != false);");
- return valid;
+ eval("var validate = "+func);
+ return validate && isFunction(validate) ? validate(this, value) : true;
}
Prado.Validation.TRangeValidator = function()