-1

I have a simple form which contains one textbox. I added required and pattern validation on this textbox. It's added red borer on the textbox when textbox is empty or not matching pattern but not displaying error message.

I have created a sample example also. Please find it here

Can you please help here?

alok_dida
  • 1,723
  • 2
  • 17
  • 36

1 Answers1

0

is for example:

<mat-error *ngIf="messageForm.get('message').hasError('required')">
              Contact full name is <strong>required</strong>
            </mat-error>

Good luck!

user3804427
  • 432
  • 2
  • 12
  • It doesn't work for me. Can you please update https://stackblitz.com/edit/angular-2osndq so that it will help me. – alok_dida Mar 20 '19 at 17:38