Closed RafaRuiz closed 1 month ago
Hi GS1 Application Identifier 01 Must be 14 characters long (see https://ref.gs1.org/ai/01). In our example length is 13
It makes sense.
Yet I've got a medical product with 13 characters, which barcode is ean13 and is the same than the one from after 01
to �
.
Is it possible to parse ignoring the GS1-01?
Hi, I have added the ability to define custom AI to the library (version 1.1.0). Custom element have highest priority Now you can add your own description of an AI element that conflicts with the standard. Look at the test custom_ai_test.dart, I took your example as a basis
final parser =
GS1BarcodeParser.configurableParser(GS1BarcodeParserConfig(customAIs: {
'01': const AI(
code: '01',
fixLength: 13,
type: AIFormatType.FIXED_LENGTH,
dataTitle: 'GTIN',
regExpString: r'^01(\d{13})$',
description: 'EAN13',
),
}));
Test it, please
All good, I guess I'll enable an use case with several parsers. Thanks.
for value:
0150602641158911020414891725122811210101