Skip to content

Commit

Permalink
fix: barcode supports string, numeric, or mixed values
Browse files Browse the repository at this point in the history
  • Loading branch information
AbleKSaju committed Jan 25, 2025
1 parent 3383589 commit 0a87cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Controls/Barcode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default defineComponent({
},
async selectItem(code: string) {
const barcode = code.trim();
if (!/\d{12,}/.test(barcode)) {
if (!/^[A-Za-z0-9]{12,}$/.test(barcode)) {
return this.error(this.t`Invalid barcode value ${barcode}.`);
}
Expand Down

0 comments on commit 0a87cab

Please sign in to comment.