diff options
Diffstat (limited to 'lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php')
-rw-r--r-- | lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php index 18f9f5f..0814c7c 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -104,6 +104,9 @@ class TActiveCustomValidator extends TCustomValidator */ public function setIsValid($value) { + // Always update the clientside, since the clientside's value for IsValid + // it could have been changed by the clientside validation. + parent::setIsValid($value); if($this->getActiveControl()->canUpdateClientSide()) { @@ -137,11 +140,15 @@ class TActiveCustomValidator extends TCustomValidator } /** - * Sets the text for the error message. Updates client-side erorr message. + * Sets the text for the error message. Updates client-side error message. * @param string the error message */ public function setErrorMessage($value) { + if(parent::getErrorMessage() === $value) + return; + + parent::setErrorMessage($value); if($this->getActiveControl()->canUpdateClientSide()) { |