trait ValidatesRequests (View source)

Methods

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

Run the validation routine against the given validator.

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

Validate the given request with the given rules.

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

Validate the given request with the given rules.

getValidationFactory()

Get a validation factory instance.

Details

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

Run the validation routine against the given validator.

Parameters

Validator|array $validator
Request $request

Return Value

array

Exceptions

ValidationException

array 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

array

Exceptions

ValidationException

array 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

array

Exceptions

ValidationException

protected Factory getValidationFactory()

Get a validation factory instance.

Return Value

Factory