diff --git a/src/module/component/mat-password-strength/mat-password-strength.component.ts b/src/module/component/mat-password-strength/mat-password-strength.component.ts index 75fae2f4..bcf28671 100644 --- a/src/module/component/mat-password-strength/mat-password-strength.component.ts +++ b/src/module/component/mat-password-strength/mat-password-strength.component.ts @@ -71,10 +71,10 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges { this._color = Colors.warn; return; } else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) { - this.calculatePasswordStrength(); + this.checkPassword(); } else { this.password && this.password.length > 0 ? - this.calculatePasswordStrength() : this.reset(); + this.checkPassword() : this.reset(); } } @@ -138,6 +138,11 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges { return this.containAtCustomChars; } + private checkPassword(): void { + this.calculatePasswordStrength(); + this.passwordConfirmationFormControl.updateValueAndValidity(); + } + parseCustomValidatorsRegex(value: string | RegExp = this.customValidator) { if (this.customValidator instanceof RegExp) { return this.customValidator;