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

Why validation is case insensitive? #1

Open
alexkuc opened this issue Mar 9, 2023 · 2 comments
Open

Why validation is case insensitive? #1

alexkuc opened this issue Mar 9, 2023 · 2 comments

Comments

@alexkuc
Copy link

alexkuc commented Mar 9, 2023

As per title, I don't understand why validation of letter case is insensitive since it forms part of the standard?

Official definition of ISO-3166 standard does not indicate the case of letters, however, when using ISO search, the alpha-2 or alpha-3 standard always uses uppercase. Also, the underlying dependency arslanimamutdinov/iso-standard-3166 uses uppercase for alpha-2 or alpha-3.

@arslanim
Copy link
Contributor

First of all, hello. Thank you for your question. As you mentioned in your issue, official definition of ISO-3166 does not indicate the case of letters. So I believe that alpha-2 and alpha-3 codes in both uppercase and lowercase are valid from the point of view of the standard. If you have links to official docs that disprove this, I'd be happy to look at them and make corrections to the code.

As for the repository https://github.com/arslanim/iso-standard-3166, its implementation was obtained by code that automatically parsed pages with standards and generated code in accordance with the results of this parsing. Accordingly, the alpha-2 and alpha-3 codes there were in uppercase.

@alexkuc
Copy link
Author

alexkuc commented Mar 17, 2024

Hello @arslanim

If you have links to official docs that disprove this

Unfortunately, the official documentation is behind a paywall. However, stefangabos/world_countries#50 indicates that letters should be in the uppercase.

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