UserUpdateRequest
class UserUpdateRequest extends FormRequest (View source)
Handles validation logic for updating an existing user.
This request ensures that updated fields such as name, email, and password meet the defined validation standards and maintain data integrity.
Methods
Determine if the user is authorized to make this request.
Define validation rules for updating a user.
Custom validation messages for the defined rules.
Prepare input data before applying validation rules.
Retrieve an input item from the request.
Merge new input into the request's data.
Retrieve a route parameter value.
Details
bool
authorize()
Determine if the user is authorized to make this request.
array
rules()
Define validation rules for updating a user.
The method validates optional fields when present in the request payload.
array
messages()
Custom validation messages for the defined rules.
protected void
prepareForValidation()
Prepare input data before applying validation rules.
Trims all string inputs to remove unnecessary whitespace and ensures clean formatting for consistent 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.
mixed
route(string|null $key = null, mixed $default = null)
Retrieve a route parameter value.