From af68030fcf0c266300feb2c100149ecadef7d364 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 16 Jul 2006 01:50:23 +0000 Subject: Merge from 3.0 branch till 1264. --- framework/Web/UI/WebControls/TCustomValidator.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'framework/Web/UI/WebControls/TCustomValidator.php') diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php index 32510f89..2afa48dc 100644 --- a/framework/Web/UI/WebControls/TCustomValidator.php +++ b/framework/Web/UI/WebControls/TCustomValidator.php @@ -120,6 +120,16 @@ class TCustomValidator extends TBaseValidator $options['ClientValidationFunction']=$clientJs; return $options; } + + /** + * Only register the client-side validator if + * {@link setClientValidationFunction ClientValidationFunction} is set. + */ + protected function registerClientScriptValidator() + { + if($this->getClientValidationFunction()!=='') + parent::registerClientScriptValidator(); + } } /** -- cgit v1.2.3