class ResetPasswordRequest extends FormRequest (View source)

Handles validation for password reset requests.

This request ensures that the new password meets security and structural requirements before allowing an update.

It trims whitespace, validates the password strength through {\App\Helpers\Validators::validatePasswordStructure()}, and requires confirmation.

Methods

bool
authorize()

Determines if the user is authorized to perform this request.

array
rules()

Defines the validation rules for the password reset process.

array
messages()

Custom error messages for password validation.

void
prepareForValidation()

Normalizes input before validation.

Store
session()

Provides access to the session instance.

void
merge(array $input = [])

Merges additional input into the current request data.

mixed
input(string|null $key = null, mixed $default = null)

Retrieves input from the request.

Details

bool authorize()

Determines if the user is authorized to perform this request.

Since password reset happens in a recovery flow, all users are allowed.

Return Value

bool

always true for this request

array rules()

Defines the validation rules for the password reset process.

Return Value

array

validation rules for the password field

array messages()

Custom error messages for password validation.

Return Value

array

localized validation messages

protected void prepareForValidation()

Normalizes input before validation.

This method trims whitespace from password fields to avoid validation failures caused by accidental spaces.

Return Value

void

Store session()

Provides access to the session instance.

Return Value

Store

void merge(array $input = [])

Merges additional input into the current request data.

Parameters

array $input

Return Value

void

mixed input(string|null $key = null, mixed $default = null)

Retrieves input from the request.

Parameters

string|null $key
mixed $default

Return Value

mixed