public function thenInvalid($message)
    {
        $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); };

        return $this;
    }
public function thenInvalid($message)
    {
        $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); };

        return $this;
    }
public function thenInvalid ( $ message ) { $ this -> thenPart = function ( $ v ) use ( $ message ) { throw new \ InvalidArgumentException ( sprintf ( $ message , json_encode ( $ v ) ) ) ; } ; return $ this ; }
Sets a closure marking the value as invalid at processing time.

if you want to add the value of the node in your message just use a %s placeholder.

@param string $message

@return $this

@throws \InvalidArgumentException
Sets a closure marking the value as invalid at processing time .