diff options
author | xue <> | 2006-11-25 21:13:03 +0000 |
---|---|---|
committer | xue <> | 2006-11-25 21:13:03 +0000 |
commit | cbe377adc3285cebc83a4980027b47bdc1c4a8a5 (patch) | |
tree | 698319b8531d6cd0c1701ee4f4176d655beebd68 /framework | |
parent | ab13651952c7ce3a5048e5b7d2f2d62d61a71de8 (diff) |
Fixed #460.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index db0c9f02..621f15bc 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -482,20 +482,22 @@ abstract class TBaseValidator extends TLabel implements IValidator */ public function validate() { - if($visible=$this->getVisible(true)) - $this->onValidate(); $this->setIsValid(true); - if($this->getValidationTarget() && $visible && $this->getEnabled()) + if($this->getVisible(true) && $this->getEnabled(true)) { - if($this->evaluateIsValid()) - { - $this->setIsValid(true); - $this->onSuccess(); - } - else + $this->onValidate(); + if($this->getValidationTarget()) { - $this->setIsValid(false); - $this->onError(); + if($this->evaluateIsValid()) + { + $this->setIsValid(true); + $this->onSuccess(); + } + else + { + $this->setIsValid(false); + $this->onError(); + } } } return $this->getIsValid(); |