Angular-Custom-Directive, it's a module which allow developpers to apply a generic and a very used validation directives which are not exist by default in Angular, so in order to not working and write this directives in each project, developper cau use this module now.
Validate password with a regular expression.
<input type="text" ngModel name="pwd" #pwd="ngModel" [passwordval]="'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})'"/>
<p *ngIf="pwd.errors?.passwordval">Password not valid</p>
Validate email with a prefix
<input type="text" ngModel name="email" #email="ngModel" [emailval]="@gmail.com"/>
<p *ngIf="email.errors?.emailval">Email not valid</p>