i am not able to clear validation errors for mat error after submitting the form. i am reseting the form by form.resetForm() after submitting but still i am not able to clear validations of the mat error.i tried reintializing the form too.can you please help?. Thanks inAdvance.
Here is the code
You don´t need ngForm
. You can simple set the errors of your control to null
.
onSubmitchngPwd() {
this.changepwdform.get("currentpassword").setErrors(null); // set errors to null
}
Collected from the Internet
Please contact javaer1[email protected] to delete if infringement.
Comments