2
0
mirror of https://github.com/frappe/books.git synced 2025-02-13 01:18:37 +00:00

fix: barcode supports string, numeric, or mixed values

This commit is contained in:
AbleKSaju 2025-01-25 10:49:34 +05:30
parent 33835891ae
commit 0a87cabd7a

View File

@ -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}.`);
}