angular 10 set error on form controle

Solutions on MaxInterview for angular 10 set error on form controle by the best coders in the world

showing results for - "angular 10 set error on form controle"
Ricardo
27 Nov 2020
1formData.form.controls['email'].setErrors({'incorrect': true}); 
2// or 
3this.registerReactiveForm.get('phoneOrEmail').setErrors({'incorrect': true })
4// or use markAsTouched method on form controle or markAs.... angular form controle methods
5formData.form.controls['email'].markAsTouched();
6