class GenreUpdateRequest extends FormRequest (View source)

Handles validation for updating an existing genre.

Includes preprocessing of input values and validation to ensure that both the name and color code are unique across genres.

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.

bool
has(array|string $key)

Determine if the request contains a given input key.

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.

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

No description

Details

bool authorize()

Determine if the user is authorized to make this request.

Return Value

bool

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 and normalizes the color code to uppercase without the "#" prefix.

Return Value

void

bool has(array|string $key)

Determine if the request contains a given input key.

Parameters

array|string $key

Return Value

bool

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

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

No description

Parameters

string $key
mixed $default

Return Value

mixed