angular set form to invalid code example Example: set form invalid angular myForm.setErrors({ 'invalid': true });