class SchoolClassStoreRequest extends FormRequest (View source)

Handles validation for creating a new school class.

Prepares input data, validates course, term, start and end dates, and ensures uniqueness of class data.

Methods

bool
authorize()

Determine if the user is authorized to make this request.

array
rules()

Get the validation rules that apply to the request.

void
withValidator(Validator $validator)

Add additional validation rules after the initial rules are applied.

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.

array
only(array|string $keys)

Retrieve only a subset of input 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

void withValidator(Validator $validator)

Add additional validation rules after the initial rules are applied.

Ensures that the combination of course, regime, start_date, and end_date is unique in the database.

Parameters

Validator $validator

Return Value

void

array messages()

Get custom error messages for validation failures.

Return Value

array

protected void prepareForValidation()

Prepare input data before validation.

Trims whitespace from all input fields and formats date fields.

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

array only(array|string $keys)

Retrieve only a subset of input data.

Parameters

array|string $keys

Return Value

array