Files
mowesta/web-angular/src/app/widgets-common/email-field.component.html
T
handte 5c9b16500b
LocationBasedServices/mowesta/master This commit looks good
Webapp design update, fix bug in measurement api.
2020-03-02 11:27:49 +01:00

10 lines
774 B
HTML

<mat-form-field [hintLabel]="res.strings('email_field_hint')" fxFlex="1 1 100%" appUseParentForm>
<input matInput #emailField="ngModel" maxlength="32" name="email" [placeholder]="res.strings('email_field_placeholder')" [(ngModel)]="email" pattern=".+@.+\..+" required [disabled]="disabled">
<mat-hint align="end">{{emailField.value?.length || 0}}/90</mat-hint>
<mat-error *ngIf="emailField.invalid">
<ng-container [ngSwitch]="encode(emailField.errors)">
<ng-container *ngSwitchCase="FormErrorCode.REQUIRED">{{ res.strings('email_field_required') }}</ng-container>
<ng-container *ngSwitchCase="FormErrorCode.PATTERN">{{ res.strings('email_field_pattern') }}</ng-container>
</ng-container>
</mat-error>
</mat-form-field>