public function callCustomValidator($callback, Request $request, array $arguments = [])
    {
        if (is_string($callback)) {
            list($class, $method) = explode('@', $callback);

            $callback = [app($class), $method];
        }

        $validator = call_user_func($callback, array_merge([$request], $arguments));

        $validator = $validator instanceof ValidatorContract
                        ? $validator
                        : Validator::make($request->all(), $validator);

        if ($validator->fails()) {
            $this->throwValidationException($request, $validator);
        }
    }
public function callCustomValidator($callback, Request $request, array $arguments = [])
    {
        if (is_string($callback)) {
            list($class, $method) = explode('@', $callback);

            $callback = [app($class), $method];
        }

        $validator = call_user_func($callback, array_merge([$request], $arguments));

        $validator = $validator instanceof ValidatorContract
                        ? $validator
                        : Validator::make($request->all(), $validator);

        if ($validator->fails()) {
            $this->throwValidationException($request, $validator);
        }
    }
public function callCustomValidator ( $ callback , Request $ request , array $ arguments = [ ] ) { if ( is_string ( $ callback ) ) { list ( $ class , $ method ) = explode ( '@' , $ callback ) ; $ callback = [ app ( $ class ) , $ method ] ; } $ validator = call_user_func ( $ callback , array_merge ( [ $ request ] , $ arguments ) ) ; $ validator = $ validator instanceof ValidatorContract ? $ validator : Validator :: make ( $ request -> all ( ) , $ validator ) ; if ( $ validator -> fails ( ) ) { $ this -> throwValidationException ( $ request , $ validator ) ; } }
Get the response from a custom validator callback.

@param  callable|string  $callback
@param  \Illuminate\Http\Request  $request
@param  array  $arguments
@return void
Get the response from a custom validator callback .