Files
maptology/web-angular/src/app/widgets/name-field.component.html
T
handte d78cebfbc0
LocationBasedServices/maptology/master This commit looks good
Fix all ng linting errors.
2019-07-28 10:32:58 +02:00

10 lines
789 B
HTML

<mat-form-field [hintLabel]="res.strings('name_field_hint')" fxFlex="1 1 100%" appUseParentForm>
<input matInput #nameField="ngModel" maxlength="64" name="name" [placeholder]="res.strings('name_field_placeholder')" [(ngModel)]="name" pattern="([A-Za-z]|[\u00C0-\u00FF]| ){0,64}" required [disabled]="disabled">
<mat-hint align="end">{{nameField.value?.length || 0}}/64</mat-hint>
<mat-error *ngIf="nameField.invalid">
<ng-container [ngSwitch]="encode(nameField.errors)">
<ng-container *ngSwitchCase="FormErrorCode.REQUIRED">{{ res.strings('name_field_required') }}</ng-container>
<ng-container *ngSwitchCase="FormErrorCode.PATTERN">{{ res.strings('name_field_pattern') }}</ng-container>
</ng-container>
</mat-error>
</mat-form-field>