summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/base/validators.js
diff options
context:
space:
mode:
authorwei <>2006-01-09 04:39:05 +0000
committerwei <>2006-01-09 04:39:05 +0000
commit9f2ecd591d5be41bb9dc7b8a0fa144ac35a173bb (patch)
tree122d77d166d5df687d524173b883d87fd6674c0d /framework/Web/Javascripts/base/validators.js
parent9c9a2d731fea9679f65904a3a6b72dd78b4253a4 (diff)
TRequiredFieldValidator works now. See FunctionalTests/index.php in your browser.
Diffstat (limited to 'framework/Web/Javascripts/base/validators.js')
-rw-r--r--framework/Web/Javascripts/base/validators.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/base/validators.js b/framework/Web/Javascripts/base/validators.js
index 99d6b416..2f49eb12 100644
--- a/framework/Web/Javascripts/base/validators.js
+++ b/framework/Web/Javascripts/base/validators.js
@@ -6,7 +6,7 @@ Prado.Validation.TRequiredFieldValidator=function(){
}
else{
var trim=Prado.Validation.Util.trim;
- var a=trim(Form.Element.getValue(this.control));
+ var a=trim($F(this.control));
var b=trim(this.attr.initialvalue);
return(a!=b);
}
@@ -16,7 +16,7 @@ Prado.Validation.TRequiredFieldValidator=function(){
Prado.Validation.TRegularExpressionValidator = function()
{
var trim = Prado.Validation.Util.trim;
- var value = trim(Form.Element.getValue(this.control));
+ var value = trim($F(this.control));
if (value == "") return true;
var rx = new RegExp(this.attr.validationexpression);
var matches = rx.exec(value);
@@ -36,7 +36,7 @@ Prado.Validation.TCustomValidator = function()
Prado.Validation.TRangeValidator = function()
{
var trim = Prado.Validation.Util.trim;
- var value = trim(Form.Element.getValue(this.control));
+ var value = trim($F(this.control));
if (value == "") return true;
var minval = this.attr.minimumvalue;
@@ -63,7 +63,7 @@ Prado.Validation.TRangeValidator = function()
Prado.Validation.TCompareValidator = function()
{
var trim = Prado.Validation.Util.trim;
- var value = trim(Form.Element.getValue(this.control));
+ var value = trim($F(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(Form.Element.getValue(comparee));
+ compareTo = trim($F(comparee));
else
{
compareTo = isString(this.attr.valuetocompare) ? this.attr.valuetocompare : "";