Clears the error messages after the submit button on the form has been clicked.