ValidatesWhenResolvedTrait

trait ValidatesWhenResolvedTrait (View source)

Provides default implementation of ValidatesWhenResolved contract.

Methods

void validate()

Validate the class instance.

Validator getValidatorInstance()

Get the validator instance for the request.

void failedValidation(Validator $validator)

Handle a failed validation attempt.

bool passesAuthorization()

Determine if the request passes the authorization check.

void failedAuthorization()

Handle a failed authorization attempt.

Details

void validate()

Validate the class instance.

Return Value

void

protected Validator getValidatorInstance()

Get the validator instance for the request.

Return Value

Validator

protected void failedValidation(Validator $validator)

Handle a failed validation attempt.

Parameters

Validator $validator

Return Value

void

Exceptions

ValidationException

protected bool passesAuthorization()

Determine if the request passes the authorization check.

Return Value

bool

protected void failedAuthorization()

Handle a failed authorization attempt.

Return Value

void

Exceptions

UnauthorizedException

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