diff options
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/TUrlMapping.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 24 |
2 files changed, 14 insertions, 12 deletions
diff --git a/framework/Web/TUrlMapping.php b/framework/Web/TUrlMapping.php index a4c662a9..5bfd8a42 100644 --- a/framework/Web/TUrlMapping.php +++ b/framework/Web/TUrlMapping.php @@ -334,7 +334,7 @@ class TUrlMappingPattern extends TComponent */
public function setRegularExpression($value)
{
- $this->_regexp;
+ $this->_regexp=$value;
}
/**
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(); |