From efc2ce4a4e469085a10a424f2fd09ce688fb6b31 Mon Sep 17 00:00:00 2001 From: carlgmathisen <> Date: Thu, 30 Oct 2008 17:07:05 +0000 Subject: Issue 39 - Implement validator not requiring ControlToValidate --- framework/Web/UI/WebControls/TBaseValidator.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TBaseValidator.php') 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(); } -- cgit v1.2.3