 ValidatesRequests   trait ValidatesRequests (View source)  Properties    protected string  $validatesRequestErrorBag The default error bag.    Methods    void   validate(Request $request, array $rules, array $messages = [], array $customAttributes = []) Validate the given request with the given rules.      void   validateWithBag(string $errorBag, Request $request, array $rules, array $messages = [], array $customAttributes = []) Validate the given request with the given rules.      void   throwValidationException(Request $request, Validator $validator) Throw the failed validation exception.      Response   buildFailedValidationResponse(Request $request, array $errors) Create the response for when a request fails validation.      array   formatValidationErrors(Validator $validator) Format the validation errors to be returned.      string   getRedirectUrl() Get the URL we should redirect to.      Factory   getValidationFactory() Get a validation factory instance.      void   withErrorBag(string $errorBag, callable $callback) Execute a Closure within with a given error bag set as the default bag.      string   errorBag() Get the key to be used for the view error bag.     Details                        void
    validate(Request $request, array $rules, array $messages = [], array $customAttributes = [])
            Validate the given request with the given rules.   Parameters   Request $request    array $rules    array $messages    array $customAttributes    Return Value   void    Exceptions   HttpResponseException                              void
    validateWithBag(string $errorBag, Request $request, array $rules, array $messages = [], array $customAttributes = [])
            Validate the given request with the given rules.   Parameters   string $errorBag    Request $request    array $rules    array $messages    array $customAttributes    Return Value   void    Exceptions   HttpResponseException                      protected        void
    throwValidationException(Request $request, Validator $validator)
            Throw the failed validation exception.   Parameters   Request $request    Validator $validator    Return Value   void    Exceptions   HttpResponseException                      protected        Response
    buildFailedValidationResponse(Request $request, array $errors)
            Create the response for when a request fails validation.   Parameters   Request $request    array $errors    Return Value   Response                      protected        array
    formatValidationErrors(Validator $validator)
            Format the validation errors to be returned.   Parameters   Validator $validator    Return Value   array                      protected        string
    getRedirectUrl()
            Get the URL we should redirect to.   Return Value   string                      protected        Factory
    getValidationFactory()
            Get a validation factory instance.   Return Value   Factory                      protected        void
    withErrorBag(string $errorBag, callable $callback)
            Execute a Closure within with a given error bag set as the default bag.   Parameters   string $errorBag    callable $callback    Return Value   void                      protected        string
    errorBag()
            Get the key to be used for the view error bag.   Return Value   string      

    
{'path': 'public/docs/laravel~5.1/api/5.1/illuminate/foundation/validation/validatesrequests.html', 'source': 'DevDocs.IO'}