Created
May 19, 2020 06:59
-
-
Save xiongemi/bf5c2fd4062d79e9e714ba4ad4c72ec9 to your computer and use it in GitHub Desktop.
update errorStateMatcher in html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mat-form-field class="mr3"> | |
<mat-label> | |
{{ 'DELIVERY.PASSWORD' | translate }} | |
<span aria-hidden="true"> * </span> | |
</mat-label> | |
<input type="password" matInput formControlName="password" [errorStateMatcher]="passwordErrorStateMatcher" maxlength="30" /> | |
<mat-error *ngIf="deliveryPageForm.hasError('password')"> | |
{{ 'ERRORS.REQUIRED' | translate }} | |
</mat-error> | |
<mat-error *ngIf="deliveryPageForm.get(['account', 'password']).hasError('pattern')"> | |
{{ 'ERRORS.PATTERN' | translate }} | |
</mat-error> | |
</mat-form-field> | |
<mat-form-field> | |
<mat-label> | |
{{ 'DELIVERY.CONFIRM_PASSWORD' | translate }} | |
<span aria-hidden="true"> * </span> | |
</mat-label> | |
<input | |
type="password" | |
matInput | |
formControlName="confirmPassword" | |
[errorStateMatcher]="confirmPassowrdErrorStateMatcher" | |
maxlength="30" | |
/> | |
<mat-error *ngIf="deliveryPageForm.hasError('confirmPassword')"> | |
{{ 'ERRORS.REQUIRED' | translate }} | |
</mat-error> | |
<mat-error *ngIf="deliveryPageForm.hasError('passwordMatch')"> | |
{{ 'DELIVERY.PASSWORD_MATCH' | translate }} | |
</mat-error> | |
</mat-form-field> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment