GenreUpdateRequest
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
Determine if the user is authorized to make this request.
Get the validation rules that apply to the request.
Get custom error messages for validation failures.
Prepare input data before validation.
Determine if the request contains a given input key.
Retrieve an input item from the request.
Merge new input into the request's data.
No description
Details
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.
protected void
prepareForValidation()
Prepare input data before validation.
Trims whitespace and normalizes the color code to uppercase without the "#" prefix.
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