1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

Revert "refactor(set-change-password): [Auth/PM-17649] Move and test compareI…" (#14171)

This reverts commit ecb4b2d0b7.
This commit is contained in:
rr-bw
2025-04-07 18:34:35 -07:00
committed by GitHub
parent ecb4b2d0b7
commit 81350a2ee1
5 changed files with 179 additions and 365 deletions

View File

@@ -25,11 +25,13 @@ import {
} from "@bitwarden/components";
import { DEFAULT_KDF_CONFIG, KeyService } from "@bitwarden/key-management";
// FIXME: remove `src` and fix import
// eslint-disable-next-line no-restricted-imports
import { InputsFieldMatch } from "../../../../angular/src/auth/validators/inputs-field-match.validator";
// FIXME: remove `src` and fix import
// eslint-disable-next-line no-restricted-imports
import { SharedModule } from "../../../../components/src/shared";
import { PasswordCalloutComponent } from "../password-callout/password-callout.component";
import { compareInputs, ValidationGoal } from "../validators/compare-inputs.validator";
import { PasswordInputResult } from "./password-input-result";
@@ -111,21 +113,21 @@ export class InputPasswordComponent implements OnInit {
},
{
validators: [
compareInputs(
ValidationGoal.InputsShouldNotMatch,
InputsFieldMatch.compareInputs(
"doNotMatch",
"currentPassword",
"newPassword",
this.i18nService.t("yourNewPasswordCannotBeTheSameAsYourCurrentPassword"),
),
compareInputs(
ValidationGoal.InputsShouldMatch,
"password",
"confirmedPassword",
InputsFieldMatch.compareInputs(
"match",
"newPassword",
"confirmNewPassword",
this.i18nService.t("masterPassDoesntMatch"),
),
compareInputs(
ValidationGoal.InputsShouldNotMatch,
"password",
InputsFieldMatch.compareInputs(
"doNotMatch",
"newPassword",
"hint",
this.i18nService.t("hintEqualsPassword"),
),