stronger validation for hopcount field