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