Improved the input validation improvement so that the error message will close when the field is emptied.