diff options
author | wei <> | 2006-01-13 04:55:22 +0000 |
---|---|---|
committer | wei <> | 2006-01-13 04:55:22 +0000 |
commit | 8da0f8dd4a0347f15df6e71ac2b0f4b3c27e8475 (patch) | |
tree | f4b75568da1fd702bcb3320259bb1642f3cc53b8 /framework/Web/Javascripts/base/validators.js | |
parent | d202492e4ad31c4127b4b459b300de7cd1976c1b (diff) |
Focus added to client validators
Diffstat (limited to 'framework/Web/Javascripts/base/validators.js')
-rw-r--r-- | framework/Web/Javascripts/base/validators.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/framework/Web/Javascripts/base/validators.js b/framework/Web/Javascripts/base/validators.js index 2f49eb12..427b46fc 100644 --- a/framework/Web/Javascripts/base/validators.js +++ b/framework/Web/Javascripts/base/validators.js @@ -5,8 +5,8 @@ Prado.Validation.TRequiredFieldValidator=function(){ return true;
}
else{
- var trim=Prado.Validation.Util.trim;
- var a=trim($F(this.control));
+ var trim=Prado.Util.trim;
+ var a=trim(Form.Element.getValue(this.control));
var b=trim(this.attr.initialvalue);
return(a!=b);
}
@@ -15,8 +15,8 @@ Prado.Validation.TRequiredFieldValidator=function(){ Prado.Validation.TRegularExpressionValidator = function()
{
- var trim = Prado.Validation.Util.trim;
- var value = trim($F(this.control));
+ var trim = Prado.Util.trim;
+ var value = trim(Form.Element.getValue(this.control));
if (value == "") return true;
var rx = new RegExp(this.attr.validationexpression);
var matches = rx.exec(value);
@@ -35,8 +35,8 @@ Prado.Validation.TCustomValidator = function() Prado.Validation.TRangeValidator = function()
{
- var trim = Prado.Validation.Util.trim;
- var value = trim($F(this.control));
+ var trim = Prado.Util.trim;
+ var value = trim(Form.Element.getValue(this.control));
if (value == "") return true;
var minval = this.attr.minimumvalue;
@@ -62,8 +62,8 @@ Prado.Validation.TRangeValidator = function() Prado.Validation.TCompareValidator = function()
{
- var trim = Prado.Validation.Util.trim;
- var value = trim($F(this.control));
+ var trim = Prado.Util.trim;
+ var value = trim(Form.Element.getValue(this.control));
if (value.length == 0) return true;
var compareTo;
@@ -71,7 +71,7 @@ Prado.Validation.TCompareValidator = function() var comparee = $(this.attr.controlhookup);;
if(comparee)
- compareTo = trim($F(comparee));
+ compareTo = trim(Form.Element.getValue(comparee));
else
{
compareTo = isString(this.attr.valuetocompare) ? this.attr.valuetocompare : "";
|