summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/js')
-rw-r--r--framework/Web/Javascripts/js/prado.js2
-rw-r--r--framework/Web/Javascripts/js/validator.js14
2 files changed, 13 insertions, 3 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index 9e01fe42..423ca0bd 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -1805,7 +1805,7 @@ return newdate;
});
var Prado =
{
-Version: '3.0a',
+Version: '3.0',
Browser : function()
{
var info = { Version : "1.0" };
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;
+}
+});