1

I have a changePasswordForm: FormGroup which I want to display empty and without any error states after the user changed the password.

After the REST call returns I also do the following:

this.changePasswordForm.reset();
// this.changePasswordForm.setErrors(null); // <-- same result
this.changePasswordForm.setErrors({required: null});
this.changePasswordForm.updateValueAndValidity();

However, all input fields remain in the error state.

How can I remove the error state from a <input matInput>?

Stefan Falk
  • 23,898
  • 50
  • 191
  • 378

0 Answers0