updated phone number check to check for invalid characters