Skip to content

Commit

Permalink
chore: add error
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaZhem committed Aug 21, 2024
1 parent cc596bc commit a7c5e67
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,25 @@
[style.margin-bottom]="'0.8rem'"
[style.margin-right]="'auto'"
/>
@if (!form.hasError('unambiguousRole') && (form.touched || form.dirty)) {
<p
class="error"
[style.margin-bottom]="'0.8rem'"
[style.margin-top]="'0'"
>
Passwords should be the same
</p>
}
<div class="under-password">
<div
[style.display]="'flex'"
[style.gap]="'0.5rem'"
>
<input
checked
formControlName="rememberMe"
tuiCheckbox
type="checkbox"
[ngModel]="true"
/>
<p
class="tui-space_top-0 tui-space_bottom-0"
Expand All @@ -82,9 +91,6 @@
</div>
<div></div>
</div>
@if (form.hasError('unambiguousRole') && (form.touched || form.dirty)) {
<p>Passwords should be the same</p>
}

<button
size="m"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ form {
width: 1.8rem;
height: 1.8rem;
}

.error {
color: var(--tui-text-negative);
font: var(--tui-font-text-s);
margin-right: auto;
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class RegisterComponent {
email: new FormControl('', [Validators.required, Validators.email]),
password: new FormControl('', [Validators.required]),
passwordAgain: new FormControl('', [Validators.required]),
rememberMe: new FormControl(false),
},
{validators: checkPasswords},
);
Expand Down

0 comments on commit a7c5e67

Please sign in to comment.