summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2006-11-26 14:59:51 +0000
committerxue <>2006-11-26 14:59:51 +0000
commit6773dfe453682d2b39a26fbabef8e706bf6bb412 (patch)
treedccc3a1ae485dbb6c7949b6aec761938b0f3a4c6 /framework/Web/UI/WebControls
parent59b18ff0ba446860cdb13e16db7ceb8f8bbe99f7 (diff)
Merge from 3.0 branch till 1513.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index 626bf13e..785282da 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->onValidationSuccess();
- }
- else
+ $this->onValidate();
+ if($this->getValidationTarget())
{
- $this->setIsValid(false);
- $this->onValidationError();
+ if($this->evaluateIsValid())
+ {
+ $this->setIsValid(true);
+ $this->onValidationSuccess();
+ }
+ else
+ {
+ $this->setIsValid(false);
+ $this->onValidationError();
+ }
}
}
return $this->getIsValid();