class LoanStoreRequest extends FormRequest (View source)

Form request responsible for validating data when storing a new loan.

Prepares input data by sanitizing the CPF and ISBN, and validates the presence and types of CPF, ISBN, and copy number.

Methods

bool
authorize()

Determine if the user is authorized to make this request.

array
rules()

Get the validation rules that apply to the request.

array
messages()

Get custom error messages for validation failures.

void
prepareForValidation()

Prepare input data before validation.

mixed
input(string $key, mixed $default = null)

Retrieve an input item from the request.

void
merge(array $input)

Merge new input into the request's data.

Details

bool authorize()

Determine if the user is authorized to make this request.

Return Value

bool

true if the user is authorized

array rules()

Get the validation rules that apply to the request.

Return Value

array

array messages()

Get custom error messages for validation failures.

Return Value

array

protected void prepareForValidation()

Prepare input data before validation.

Sanitizes the CPF by removing non-digits and the ISBN by removing all characters except digits and 'X'.

Return Value

void

mixed input(string $key, mixed $default = null)

Retrieve an input item from the request.

Parameters

string $key
mixed $default

Return Value

mixed

void merge(array $input)

Merge new input into the request's data.

Parameters

array $input

Return Value

void