# Validation

Input validation

Please enter only characters

Email validation

Please enter a valid email address

# Usage of Validation

<tabs>

        ...@Directive textinput...

        <input class="form-control"   type="text" name="InputerName" [(ngModel)]="inputModel" #InputName="ngModel" textinput>
          < class="alert alert-danger" *ngIf="InputName.errors?.textinput">Please enter only characters
     ...@Directive email...
      <p input type="email" class="form-control" id="email" [(ngModel)]="emailTy.email" name="email" #email="ngModel" email>
     <p class="alert alert-danger" *ngIf="email.errors?.email">....Please enter a valid email address....

    Import CustomValidators module in app.module.ts
    "import <CustomValidators> from './../../utils/validation'";

</tabs>