user validation and error message