trait ValidatesRequests (View source)

Methods

void
validateWith( Validator|array $validator, Request $request = null)

Run the validation routine against the given validator.

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

at line line 27
void validateWith( Validator|array $validator, Request $request = null)

Run the validation routine against the given validator.

Parameters

Validator|array $validator
Request $request

Return Value

void

at line line 49
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

at line line 70
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

ValidationException