summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveCustomValidator.php
diff options
context:
space:
mode:
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()