src/Core/Validator.php
public function addValidator($index, $method = null, array $params = [], $message = null)
    {
        // set up params
        array_unshift($params, $method);
        array_unshift($params, $index);

        call_user_func_array([$this->getValidator(), 'addRule'], $params);

        // Message management
        if (!is_null($message)) {
            $this->getValidator()->addMessage($index, $message);
        }

        return $this;
    }
public function addValidator($index, $method = null, array $params = [], $message = null)
    {
        // set up params
        array_unshift($params, $method);
        array_unshift($params, $index);

        call_user_func_array([$this->getValidator(), 'addRule'], $params);

        // Message management
        if (!is_null($message)) {
            $this->getValidator()->addMessage($index, $message);
        }

        return $this;
    }
public function addValidator ( $ index , $ method = null , array $ params = [ ] , $ message = null ) { // set up params array_unshift ( $ params , $ method ) ; array_unshift ( $ params , $ index ) ; call_user_func_array ( [ $ this -> getValidator ( ) , 'addRule' ] , $ params ) ; // Message management if ( ! is_null ( $ message ) ) { $ this -> getValidator ( ) -> addMessage ( $ index , $ message ) ; } return $ this ; }
Add a single validator with message to the validator container

@param $index
@param null $method
@param array $params
@param null $message
@return $this
Add a single validator with message to the validator container