error handling for user validation