Polish forced password change flow
linter / quality (pull_request) Successful in 1m19s
tests / ci (8.4) (pull_request) Successful in 1m44s

This commit is contained in:
2026-05-22 21:10:14 +00:00
parent 5bb6e57db4
commit 704dd6c26e
3 changed files with 61 additions and 2 deletions
@@ -19,7 +19,19 @@ class PasswordUpdateRequest extends FormRequest
{
return [
'current_password' => $this->currentPasswordRules(),
'password' => $this->passwordRules(),
'password' => [...$this->passwordRules(), 'different:current_password'],
];
}
/**
* Get the custom validation messages for the request.
*
* @return array<string, string>
*/
public function messages(): array
{
return [
'password.different' => 'The new password must be different from your current password.',
];
}
}