Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
 
PREVIOUS NEXT
Tagged: #angular #set #error #form #controle
ADD COMMENT
Topic
Name
7+5 =