Enable closing error message after validation