summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveCustomValidator.php
diff options
context:
space:
mode:
authorwei <>2006-10-28 07:43:27 +0000
committerwei <>2006-10-28 07:43:27 +0000
commit5bd4f1f34bb08469d3e18727f9d39c53037c6424 (patch)
tree7da05a55d69be12976635107f448d4f99d4964b2 /framework/Web/UI/ActiveControls/TActiveCustomValidator.php
parente4c9e8e311dc09424e4b865f53a0a6fe6872c4e6 (diff)
Add TActiveCustomValidator to change ErrorMessage on callbback.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveCustomValidator.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCustomValidator.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php
index a0ef895c..1668b54f 100644
--- a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php
+++ b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php
@@ -125,6 +125,21 @@ class TActiveCustomValidator extends TCustomValidator
}
/**
+ * Sets the text for the error message. Updates client-side erorr message.
+ * @param string the error message
+ */
+ public function setErrorMessage($value)
+ {
+ parent::setErrorMessage($value);
+ if($this->getActiveControl()->canUpdateClientSide())
+ {
+ $client = $this->getPage()->getCallbackClient();
+ $func = 'Prado.Validation.setErrorMessage';
+ $client->callClientFunction($func, array($this, $value));
+ }
+ }
+
+ /**
* Register the javascript for the active custom validator.
*/
protected function registerClientScriptValidator()