diff options
author | wei <> | 2006-01-09 03:40:59 +0000 |
---|---|---|
committer | wei <> | 2006-01-09 03:40:59 +0000 |
commit | 9c9a2d731fea9679f65904a3a6b72dd78b4253a4 (patch) | |
tree | 1d81a12a7a79e74e98218d01c6278a81f0996f5d /framework/Web/Javascripts/base/validators.js | |
parent | 10420d2bcde1a7437b58175f417170b2d6d93e50 (diff) |
Update library
Diffstat (limited to 'framework/Web/Javascripts/base/validators.js')
-rw-r--r-- | framework/Web/Javascripts/base/validators.js | 9 |
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()
|