Form validation is not working in ionic 2


#1

I am working on form validation but it does not work. here is my code:
In form i have multiple elements , now i am apply validation on this element:

<div class="row">
            <input class="input"  name="name" [(ngModel)]="name" type="text" placeholder="" minlength="3" maxlength="50"  pattern="/^[a-zA-Z][a-zA-Z ]+$/" ngControl="name"  required >
        </div>
<div  *ngIf="name.error.minlength"> Name must be atleast three letter</div>

#2

Have a look at this tutorial: