summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBaseValidator.php
diff options
context:
space:
mode:
authorxue <>2006-07-02 18:05:42 +0000
committerxue <>2006-07-02 18:05:42 +0000
commit7e002c23edc5fb5db70935591aa6adeda25fc7fb (patch)
tree846feb337405448cc1559c2e7b4ed6f85798e0c7 /framework/Web/UI/WebControls/TBaseValidator.php
parent618293517861b69334cd470068199394120cd20a (diff)
Merge from 3.0 branch till 1224.
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index a0801d4c..9366de62 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -124,7 +124,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
}
/**
- * Adds attributes to renderer. Calls parent implementation and renders the
+ * Adds attributes to renderer. Calls parent implementation and renders the
* client control scripts.
* @param THtmlWriter the renderer
*/
@@ -237,7 +237,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$this->registerClientScriptValidator();
$this->updateControlCssClass();
}
-
+
/**
* Update the ControlToValidate component's css class depending
* if the ControlCssClass property is set, and whether this is valid.
@@ -635,6 +635,25 @@ class TClientSideValidatorOptions extends TClientSideOptions
}
/**
+ * @param boolean true to revalidate when the control to validate changes value.
+ */
+ public function setObserveChanges($value)
+ {
+ $this->setOption('ObserveChanges', TPropertyValue::ensureBoolean($value));
+ }
+
+ /**
+ * @return boolean true to observe changes.
+ */
+ public function getObserveChanges()
+ {
+ if(($option=$this->getOption('ObserveChanges'))!==null)
+ return $option;
+ else
+ return true;
+ }
+
+ /**
* Ensure the string is a valid javascript function. If the string begins
* with "javascript:" valid javascript function is assumed, otherwise the
* code block is enclosed with "function(validator, sender){ }" block.