summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBaseValidator.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index c9917a2b..c90f4d9d 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -239,7 +239,6 @@ abstract class TBaseValidator extends TLabel implements IValidator
{
$manager['FormID'] = $formID;
$options = TJavaScript::encode($manager);
- $scripts->registerPradoScript('validator');
$scripts->registerEndScript($scriptKey, "new Prado.ValidationManager({$options});");
}
if($this->getEnableClientScript())
@@ -254,6 +253,8 @@ abstract class TBaseValidator extends TLabel implements IValidator
{
parent::onPreRender($param);
$this->updateControlCssClass();
+ if ($this->getEnableClientScript())
+ $this->getPage()->getClientScript()->registerPradoScript('validator');
}
/**