Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <div class="container">
  2. <br />
  3. <form (ngSubmit)='loginUser()'
  4. [formGroup]='loginForm' novalidate class="form">
  5. <label>Username:
  6. <input formControlName='username' type="text"
  7. placeholder="Enter Email" />
  8. <div class="alert alert-danger"
  9. *ngIf="loginForm.get('username').hasError('required')
  10. && loginForm.get('username').touched">
  11. username is required and min length is 4.
  12. </div>
  13. </label><br>
  14. <label>Password:
  15. <input formControlName='password' type="password"
  16. placeholder="Enter Password" />
  17. <div class="alert alert-danger"
  18. *ngIf=" !loginForm.get('password').valid &&
  19. loginForm.get('password').touched">
  20. Password is required and should less than 8 characters
  21. </div>
  22. </label><br>
  23.  
  24. <button [disabled]='loginForm.invalid' class="btn btn-default">Login</button>
  25. </form>
  26. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement