W3cubDocs

/Laravel 5.1

ValidatesRequests

trait ValidatesRequests (View source)

Methods

void validate( Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

void validateWithBag( string $errorBag, Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

Details

void validate( Request $request, array $rules, array $messages = array(), array $customAttributes = array())

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(), array $customAttributes = array())

Validate the given request with the given rules.

Parameters

string $errorBag
Request $request
array $rules
array $messages
array $customAttributes

Return Value

void

Exceptions

HttpResponseException

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Foundation/Validation/ValidatesRequests.html