Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "strict" validation ? #7

Open
georgeyk opened this issue Feb 13, 2018 · 1 comment
Open

Add a "strict" validation ? #7

georgeyk opened this issue Feb 13, 2018 · 1 comment

Comments

@georgeyk
Copy link

Consider the code 0000098795147 (taken from test_valid_gtin8_string_with_leading_zeros test), it is a valid gtin8 code, but should not be considered a valid gtin13 code.

The list of prefixes https://www.gs1.org/company-prefix.
Maybe there are other prefixes than 00000 that should be validated depending on gtin "type".

Another case to consider, invalidate 00000000 (it's a valid code, but I think it's reserved or similar).
So, maybe we should have a way to make the validation more "restricted". Any thoughts ?

@charithe
Copy link
Owner

Sounds like a useful feature. I will be happy to accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants