angular form control get error code example
Example: angular 10 set error on form controle
formData.form.controls['email'].setErrors({'incorrect': true});
// or
this.registerReactiveForm.get('phoneOrEmail').setErrors({'incorrect': true })
// or use markAsTouched method on form controle or markAs.... angular form controle methods
formData.form.controls['email'].markAsTouched();