Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created January 7, 2018 19:11
Show Gist options
  • Save uno-de-piera/c22c795e1234b7dcdbc5c26584b44edf to your computer and use it in GitHub Desktop.
Save uno-de-piera/c22c795e1234b7dcdbc5c26584b44edf to your computer and use it in GitHub Desktop.
<div class="form-group">
<label class="center-block">Teléfono:
<input type="text" class="form-control" formControlName="phone">
</label>
<div *ngIf="loginForm.get('phone').errors" class="alert alert-danger">
<div *ngIf="loginForm.get('phone').errors['required']">
Teléfono requerido
</div>
<div *ngIf="loginForm.get('phone').errors['phoneNumber']">
Teléfono incorrecto
</div>
<div *ngIf="loginForm.get('phone').errors['pattern']">
Patrón teléfono incorrecto
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment