public function run($handler_id, &$submitted, array $options = array())
    {
        $result = null;
        $this->hook->attach('validator.run.before', $submitted, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->callHandler($handler_id, $submitted, $options);
        $this->hook->attach('validator.run.after', $submitted, $options, $result, $this);

        if ($result === true) {
            return true;
        }

        return empty($result) ? $this->translation->text('Failed validation') : $result;
    }
public function run($handler_id, &$submitted, array $options = array())
    {
        $result = null;
        $this->hook->attach('validator.run.before', $submitted, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->callHandler($handler_id, $submitted, $options);
        $this->hook->attach('validator.run.after', $submitted, $options, $result, $this);

        if ($result === true) {
            return true;
        }

        return empty($result) ? $this->translation->text('Failed validation') : $result;
    }
public function run ( $ handler_id , & $ submitted , array $ options = array ( ) ) { $ result = null ; $ this -> hook -> attach ( 'validator.run.before' , $ submitted , $ options , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ result = $ this -> callHandler ( $ handler_id , $ submitted , $ options ) ; $ this -> hook -> attach ( 'validator.run.after' , $ submitted , $ options , $ result , $ this ) ; if ( $ result === true ) { return true ; } return empty ( $ result ) ? $ this -> translation -> text ( 'Failed validation' ) : $ result ; }
Performs validation using the given handler
@param string $handler_id
@param mixed $submitted
@param array $options
@return mixed
Performs validation using the given handler