protected function withErrorBag($errorBag, callable $callback)
    {
        $this->validatesRequestErrorBag = $errorBag;

        call_user_func($callback);

        $this->validatesRequestErrorBag = null;
    }
protected function withErrorBag($errorBag, callable $callback)
    {
        $this->validatesRequestErrorBag = $errorBag;

        call_user_func($callback);

        $this->validatesRequestErrorBag = null;
    }
protected function withErrorBag ( $ errorBag , callable $ callback ) { $ this -> validatesRequestErrorBag = $ errorBag ; call_user_func ( $ callback ) ; $ this -> validatesRequestErrorBag = null ; }
Execute a Closure within with a given error bag set as the default bag.

@param  string  $errorBag
@param  callable  $callback
@return void
Execute a Closure within with a given error bag set as the default bag .