You can if you create a custom form and use a relation to check for an existing barcode. Only enable the submit button if the relation is empty.