Skip to content

Commit 3372be8

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents d2844be + baf0365 commit 3372be8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/module/component/mat-password-strength/mat-password-strength.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
7171
this._color = Colors.warn;
7272
return;
7373
} else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
74-
this.calculatePasswordStrength();
74+
this.checkPassword();
7575
} else {
7676
this.password && this.password.length > 0 ?
77-
this.calculatePasswordStrength() : this.reset();
77+
this.checkPassword() : this.reset();
7878
}
7979
}
8080

@@ -138,6 +138,11 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
138138
return this.containAtCustomChars;
139139
}
140140

141+
private checkPassword(): void {
142+
this.calculatePasswordStrength();
143+
this.passwordConfirmationFormControl.updateValueAndValidity();
144+
}
145+
141146
parseCustomValidatorsRegex(value: string | RegExp = this.customValidator) {
142147
if (this.customValidator instanceof RegExp) {
143148
return this.customValidator;

0 commit comments

Comments
 (0)