diff --git a/app/Http/Requests/Settings/PasswordUpdateRequest.php b/app/Http/Requests/Settings/PasswordUpdateRequest.php index 0e5ff2f..6536ae5 100644 --- a/app/Http/Requests/Settings/PasswordUpdateRequest.php +++ b/app/Http/Requests/Settings/PasswordUpdateRequest.php @@ -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 + */ + public function messages(): array + { + return [ + 'password.different' => 'The new password must be different from your current password.', ]; } } diff --git a/resources/js/pages/auth/ForcePasswordChange.vue b/resources/js/pages/auth/ForcePasswordChange.vue index 9c27640..29f9e79 100644 --- a/resources/js/pages/auth/ForcePasswordChange.vue +++ b/resources/js/pages/auth/ForcePasswordChange.vue @@ -1,5 +1,6 @@