Skip to content

Commit 75dd26e

Browse files
committed
7: update register form with validators
1 parent 700e70c commit 75dd26e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/public/components/register/register.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
Last Name is required</mat-error>
3737
</mat-form-field>
3838

39-
4039
<mat-form-field>
4140
<input type="password" matInput placeholder="Password" formControlName="password">
4241
<mat-error
@@ -51,6 +50,10 @@
5150
Password Confirmation is required</mat-error>
5251
</mat-form-field>
5352

53+
<mat-error
54+
*ngIf="this.registerForm.get('passwordConfirm')?.dirty && this.registerForm.hasError('passwordsNotMatching')">
55+
Passwords are not matching!</mat-error>
56+
5457
<div class="button">
5558
<!-- Button is disabled(not clickable), if our RegisterForm contains Validation Errors -->
5659
<button type="submit" mat-button [disabled]="!registerForm.valid">Register</button>

0 commit comments

Comments
 (0)