src/Util/Validator.php
public function addInstanceRule(string $name, callable $callback, string $message = null): self
    {
        static::assertRuleCallback($callback);

        $this->_instanceRules[$name] = $callback;
        $this->_instanceRuleMessage[$name] = $message;

        return $this;
    }
public function addInstanceRule(string $name, callable $callback, string $message = null): self
    {
        static::assertRuleCallback($callback);

        $this->_instanceRules[$name] = $callback;
        $this->_instanceRuleMessage[$name] = $message;

        return $this;
    }
public function addInstanceRule ( string $ name , callable $ callback , string $ message = null ) : self { static :: assertRuleCallback ( $ callback ) ; $ this -> _instanceRules [ $ name ] = $ callback ; $ this -> _instanceRuleMessage [ $ name ] = $ message ; return $ this ; }
Adds a new validation rule callback that is tied to the current
instance only.

@param string   $name
@param callable $callback
@param string   $message

@return $this
@throws \InvalidArgumentException
Adds a new validation rule callback that is tied to the current instance only .