BarCode validates user input