This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's a component to validate required fields, minimun length, patterns and custom validations. | |
Example 1 : Validate: required, minlength and a pattern. | |
some.component.html | |
<input pInputText type="text" name="email" [(ngModel)]="user.email" | |
ngModel #email="ngModel" required minlength="5" | |
pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$"> | |
<app-input-validation [control]="email" |