summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/validator.js
diff options
context:
space:
mode:
authorwei <>2006-04-27 08:45:53 +0000
committerwei <>2006-04-27 08:45:53 +0000
commit77154dc44ced0653f585a33fdea937e09abc29ea (patch)
tree2b16a6a350fba64fc8d6cc6128ce421da3082b57 /framework/Web/Javascripts/js/validator.js
parentf484625461b528b8fe66da45a63af88b2239bdcd (diff)
Compile the javascript changes.
Diffstat (limited to 'framework/Web/Javascripts/js/validator.js')
-rw-r--r--framework/Web/Javascripts/js/validator.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/js/validator.js b/framework/Web/Javascripts/js/validator.js
index a68fbfa1..5e23df50 100644
--- a/framework/Web/Javascripts/js/validator.js
+++ b/framework/Web/Javascripts/js/validator.js
@@ -321,10 +321,10 @@ this.visible = false;
},
validate : function(invoker)
{
-if(this.enabled)
-this.isValid = this.evaluateIsValid();
if(typeof(this.options.OnValidate) == "function")
this.options.OnValidate(this, invoker);
+if(this.enabled)
+this.isValid = this.evaluateIsValid();
if(this.isValid)
{
if(typeof(this.options.OnSuccess) == "function")
@@ -656,3 +656,13 @@ required = this.options.Required.split(/,\s*/);
return required;
}
});
+Prado.WebUI.TDataTypeValidator = Class.extend(Prado.WebUI.TBaseValidator,
+{
+evaluateIsValid : function()
+{
+var value = this.getValidationValue();
+if(value.length <= 0)
+return true;
+return this.convert(this.options.DataType, value) != null;
+}
+});