This file contains hidden or 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" |
This file contains hidden or 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
| PrimeNG has 2 different components to display messages: | |
| The Messages component: https://www.primefaces.org/primeng/#/messages | |
| The Growl component: https://www.primefaces.org/primeng/#/growl | |
| notifications.component.ts - is the notification component with both growl and services from PrimeNg: | |
| <p-growl [value]="growl"></p-growl> | |
| <p-messages [value]="message"></p-messages> | |
| notifications.service.ts - is the service to be used to send messages do Growl and Messages. |