The use of iso3166list is a problem for simple validators that are concerned only with structural validation (i.e., type and length). The way AIs 423 and 425 are defined, a structural validator would allow "1234" to pass.
|
423 ? N..15,iso3166list req=01,02 ex=426 # COUNTRY - INITIAL PROCESS |
|
424 ? N3,iso3166 req=01,02 ex=426 # COUNTRY - PROCESS |
|
425 ? N..15,iso3166list req=01,02 ex=426 # COUNTRY - DISASSEMBLY |
I suggest these be rewritten using the optional terminology as follows:
423 ? N3,iso3166 [N3,iso3166] [N3,iso3166] [N3,iso3166] [N3,iso3166] req=01,02 ex=426 # COUNTRY - INITIAL PROCESS
424 ? N3,iso3166 req=01,02 ex=426 # COUNTRY - PROCESS
425 ? N3,iso3166 [N3,iso3166] [N3,iso3166] [N3,iso3166] [N3,iso3166] req=01,02 ex=426 # COUNTRY - DISASSEMBLY
An alternative would be to borrow the repetition syntax from regex:
423 ? N3,iso3166{1,5} req=01,02 ex=426 # COUNTRY - INITIAL PROCESS
424 ? N3,iso3166 req=01,02 ex=426 # COUNTRY - PROCESS
425 ? N3,iso3166{1,5} req=01,02 ex=426 # COUNTRY - DISASSEMBLY
The use of iso3166list is a problem for simple validators that are concerned only with structural validation (i.e., type and length). The way AIs 423 and 425 are defined, a structural validator would allow "1234" to pass.
gs1-syntax-dictionary/gs1-syntax-dictionary.txt
Lines 213 to 215 in ee18e07
I suggest these be rewritten using the optional terminology as follows:
An alternative would be to borrow the repetition syntax from regex: