Proper barcode validation (closes #275)