Validate barcode uniqueness.