Clear error message when rendering a nonvalid component