Created
January 7, 2018 15:38
-
-
Save uno-de-piera/ad13ed425c882c7e020d9c22e5c2c04f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form [formGroup]="loginForm" (ngSubmit)="submit()" novalidate> | |
<div class="form-group"> | |
<label class="center-block">Email: | |
<input class="form-control" formControlName="email"> | |
</label> | |
<div *ngIf="loginForm.get('email').errors" class="alert alert-danger"> | |
<div *ngIf="loginForm.get('email').errors['required']"> | |
Email requerido | |
</div> | |
<div *ngIf="loginForm.get('email').errors['email']"> | |
Email incorrecto | |
</div> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label class="center-block">Password: | |
<input type="password" class="form-control" formControlName="password"> | |
</label> | |
<div *ngIf="loginForm.get('password').errors" class="alert alert-danger"> | |
<div *ngIf="loginForm.get('password').errors['required']"> | |
Password requerido | |
</div> | |
<div *ngIf="loginForm.get('password').errors['minlength']"> | |
Password inseguro | |
</div> | |
</div> | |
</div> | |
<button type="submit" class="btn btn-primary btn-block" [disabled]="!loginForm.valid">Login</button> | |
<button type="reset" class="btn btn-default btn-block">Reset</button> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment