summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/debug/validator.js
diff options
context:
space:
mode:
authorwei <>2006-08-30 23:28:51 +0000
committerwei <>2006-08-30 23:28:51 +0000
commit2fda7f49f3792a0718838742b76a4b533c169af9 (patch)
tree46a5a3eb53a0d64fc25894bfd219a82cecffa807 /framework/Web/Javascripts/js/debug/validator.js
parent1f560ccd8a9e21871dbedd548fc97f231131c771 (diff)
Updated TInPlaceTextBox
Diffstat (limited to 'framework/Web/Javascripts/js/debug/validator.js')
-rw-r--r--framework/Web/Javascripts/js/debug/validator.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/js/debug/validator.js b/framework/Web/Javascripts/js/debug/validator.js
index 7a963f82..ec57e876 100644
--- a/framework/Web/Javascripts/js/debug/validator.js
+++ b/framework/Web/Javascripts/js/debug/validator.js
@@ -90,6 +90,15 @@ Object.extend(Prado.Validation,
},
/**
+ * @return string first form ID.
+ */
+ getForm : function()
+ {
+ var keys = $H(this.managers).keys();
+ return keys[0];
+ },
+
+ /**
* Check if the validators are valid for a particular form (and group).
* The validators states will not be changed.
* The <tt>validate</tt> function should be called first.
@@ -647,6 +656,16 @@ Prado.WebUI.TBaseValidator.prototype =
*/
validate : function(invoker)
{
+ //try to find the control.
+ if(!this.control)
+ this.control = $(this.options.ControlToValidate);
+
+ if(!this.control)
+ {
+ this.isValid = true;
+ return this.isValid;
+ }
+
if(typeof(this.options.OnValidate) == "function")
this.options.OnValidate(this, invoker);