Skip to content

Commit

Permalink
Use typed form in template when possible #10701
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Sep 13, 2024
1 parent 16f32a4 commit 10b4a3d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/app/front-office/components/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
type="email"
(keydown.enter)="maybeConfirm()"
/>
@if (form.get('email')?.hasError('maxlength')) {
<mat-error>Maximum {{ form.get('email')?.errors?.maxlength?.requiredLength }} caractères</mat-error>
@if (form.controls.email.hasError('maxlength')) {
<mat-error
>Maximum {{ form.controls.email.errors?.maxlength?.requiredLength }} caractères</mat-error
>
}
@if (form.get('email')?.hasError('email')) {
@if (form.controls.email.hasError('email')) {
<mat-error>Courriel invalide</mat-error>
}
@if (form.get('email')?.hasError('required')) {
@if (form.controls.email.hasError('required')) {
<mat-error>Requis</mat-error>
}
</mat-form-field>
Expand All @@ -37,7 +39,7 @@
type="password"
(keydown.enter)="maybeConfirm()"
/>
@if (form.get('password')?.hasError('required')) {
@if (form.controls.password.hasError('required')) {
<mat-error>Requis</mat-error>
}
</mat-form-field>
Expand Down

0 comments on commit 10b4a3d

Please sign in to comment.