class UserDestroyRequest extends FormRequest (View source)

Handles validation logic for destroying an existing user.

This request ensures that the password field is validated properly and maintains data integrity during user deletion.

Methods

bool
authorize()

Determine if the user is authorized to make this request.

array
rules()

Define validation rules for updating a user.

array
messages()

Custom validation messages for the defined rules.

void
prepareForValidation()

Prepare input data before applying validation rules.

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.

Details

bool authorize()

Determine if the user is authorized to make this request.

Return Value

bool

true if the request is authorized

array rules()

Define validation rules for updating a user.

The method validates optional fields when present in the request payload.

Return Value

array

validation rules for user input fields

array messages()

Custom validation messages for the defined rules.

Return Value

array

error messages for validation failures

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.

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