class SchoolClassUpdateRequest extends FormRequest (View source)

Handles validation for updating an existing school class.

Prepares and sanitizes input data and validates optional fields: course, term, start_date, and end_date.

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.

bool
has(string $key)

Determine if the request contains a given input key.

void
merge(array $input)

Merge new input into the request's data.

array
all(?array $keys = null)

Retrieve all input data or a subset.

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 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.

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

bool has(string $key)

Determine if the request contains a given input key.

Parameters

string $key

Return Value

bool

void merge(array $input)

Merge new input into the request's data.

Parameters

array $input

Return Value

void

array all(?array $keys = null)

Retrieve all input data or a subset.

Parameters

?array $keys

Return Value

array

array only(array|string $keys)

Retrieve only a subset of input data.

Parameters

array|string $keys

Return Value

array