/** * Executes the validator. * * Executes the operators validate()-Method after checking the quantity * of child validators with checkValidSetup(). * * @param AgaviParameterHolder The parameters which should be validated. * * @return int The result of validation (SUCCESS, NONE, NOTICE, ERROR, CRITICAL). * * @author Uwe Mesecke <*****@*****.**> * @since 0.11.0 */ public function execute(AgaviRequestDataHolder $parameters) { // check if we have a valid setup of validators $this->checkValidSetup(); $result = parent::execute($parameters); if ($result != AgaviValidator::SUCCESS && !$this->getParameter('skip_errors') && $this->result == AgaviValidator::CRITICAL) { /* * one of the child validators resulted with CRITICAL * we change our operator's result to CRITICAL, too so the * surrounding validator container is aware of the critical * result and can abort further validation... */ $result = AgaviValidator::CRITICAL; } return $result; }