Skip to content

Instantly share code, notes, and snippets.

@CharlieGreenman
Created September 20, 2019 12:37
Show Gist options
  • Save CharlieGreenman/dc8a22bc3a08988931081b3bc890863a to your computer and use it in GitHub Desktop.
Save CharlieGreenman/dc8a22bc3a08988931081b3bc890863a to your computer and use it in GitHub Desktop.
<mat-form-field [formGroup]="newsletterForm" class="email-field" >
<input matInput razrooNumber formControlName="email" placeholder="Your E-mail" required>
</mat-form-field>
<ng-container *ngIf="email.invalid && (email.dirty || email.touched)">
<mat-error *ngIf="email.errors.number">Not a number</mat-error>
</ng-container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment