UNPKG

ipsos-components

Version:

Material Design components for Angular

12 lines (11 loc) 466 B
<form class="example-form"> <mat-form-field class="example-full-width"> <input matInput placeholder="Email" [formControl]="emailFormControl"> <mat-error *ngIf="emailFormControl.hasError('email') && !emailFormControl.hasError('required')"> Please enter a valid email address </mat-error> <mat-error *ngIf="emailFormControl.hasError('required')"> Email is <strong>required</strong> </mat-error> </mat-form-field> </form>