Skip to content

Commit

Permalink
Merge pull request #1100 from AbleKSaju/fix-barcode
Browse files Browse the repository at this point in the history
fix: barcode supports string, numeric, or mixed values
  • Loading branch information
akshayitzme authored Jan 27, 2025
2 parents 3383589 + 0a87cab commit 7d808c2
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 7d808c2

Please sign in to comment.