Added validateBarcodeEntry function