summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBaseValidator.php
diff options
context:
space:
mode:
authorcarlgmathisen <>2008-10-30 17:07:05 +0000
committercarlgmathisen <>2008-10-30 17:07:05 +0000
commitefc2ce4a4e469085a10a424f2fd09ce688fb6b31 (patch)
tree6f0aef272f4ea2c9857dc12c15d5e9efa5d4cf2e /framework/Web/UI/WebControls/TBaseValidator.php
parent4baf17880e3c83b6900794459d2ebb9adf379aa3 (diff)
Issue 39 - Implement validator not requiring ControlToValidate
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index 56239bcb..b418885c 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -496,7 +496,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$this->setIsValid(true);
$this->onValidate();
if($this->getVisible(true) && $this->getEnabled(true))
- {
+ {
// if the target is not a disabled web control
if(($target=$this->getValidationTarget())!==null && !($target instanceof TWebControl && !$target->getEnabled(true)))
{
@@ -512,6 +512,12 @@ abstract class TBaseValidator extends TLabel implements IValidator
$this->onValidationError();
}
}
+ else
+ {
+ $this->evaluateIsValid();
+ $this->setIsValid(true);
+ $this->onValidationSuccess();
+ }
}
return $this->getIsValid();
}