Search code examples
angularionic-frameworkangular-materialionic4angular-reactive-forms

How i resolve error in angular reactive forms


I'm getting error of invalid pattern error image in address field as i haven't set any validation on that specific field.

Here is the declaration of formgroup.

this.formGroup = this.fb.group({
  id: [''],
  firstname: ['', Validators.compose([Validators.required])],
  lastname: ['', Validators.compose([Validators.required])],
  contactNo: [''],
  email: [''],
  address: [''],
})

I'm attaching the error picture.

Thank you in advance.


Solution

  • Looks like you are using pattern directive in your HTML.