improving the validate email function error response