Skip to Main Content
Hands-On Full Stack Web Development with Angular 6 and Laravel 5
book

Hands-On Full Stack Web Development with Angular 6 and Laravel 5

by Fernando Monteiro
July 2018
Intermediate to advanced content levelIntermediate to advanced
420 pages
8h 46m
English
Packt Publishing
Content preview from Hands-On Full Stack Web Development with Angular 6 and Laravel 5

Dealing with form validation on model-driven forms

Open ./Client/src/app/pages/auth/register/register.component.html and replace the form tag with the following code:

 <form [formGroup]="registerForm" (ngSubmit)="onSubmit()" class="form-register" novalidate> <div class="text-center mb-4"> <h1 class="h3 mt-3 mb-3 font-weight-normal">Welcome</h1> <p>Motorcycle builders and road lovers</p> <hr> </div> <div class="form-group" [ngClass]="{ 'has-error': !registerForm.get('name').valid && (registerForm.get('name').dirty || registerForm.get('name').touched) }"> <label for="name">Name</label> <input type="name" formControlName="name" class="form-control" id="name" aria-describedby="nameHelp" placeholder="Enter your name"> <div class="form-feedback" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Laravel: Up and Running

Laravel: Up and Running

Matt Stauffer
Building Large-Scale Web Applications with Angular

Building Large-Scale Web Applications with Angular

Chandermani Arora, Kevin Hennessy, Christoffer Noring, Doguhan Uluca

Publisher Resources

ISBN: 9781788833912Supplemental Content