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

UK not accepted as a CountryCode #225

Closed
flaeppe opened this issue Jul 19, 2022 · 2 comments
Closed

UK not accepted as a CountryCode #225

flaeppe opened this issue Jul 19, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@flaeppe
Copy link
Contributor

flaeppe commented Jul 19, 2022

I know the official alpha-2 code is GB and UK is part of the "exceptional reservations" list of iso3166-1 alpha-2, but frankly, all addresses in Great Britain have a post code of UK.

I think it could be useful to include UK as well, in cases where one wants to use e.g. country: CountryCode for address validation or the like.

@antonagestam
Copy link
Owner

@flaeppe I don't think I agree with this.

Your proposal completely changes the meaning of the CountryCode type, and I think it'd be very hard to convince me a non standards confirming type is more useful.

An alternative would be to introduce a new type, but I'm not sure what that type should be to fit your usecase. Doesn't addresses usually just have the full name of the country? E.g. "United Kingdom" in your case?

FWIW I believe french is the official international postal language so, technically "La Suède" is as correct as "Sweden" on a parcel sent to Sweden. What I'm trying to get at is that I don't think that it makes sense for the CountryCode type to have the ability to determine whether or not an address country is correct, and I'm not confident such ability fits here. Wdyt? I'm open to further discussion!

@antonagestam antonagestam added the enhancement New feature or request label Jul 20, 2022
@flaeppe
Copy link
Contributor Author

flaeppe commented Jul 20, 2022

Any additional type feels a bit off.

Think I opened this issue a bit hastily, and indeed one could perhaps go for a verbose value of the code GB to be UK.

What I initially got in trouble with was aligning with other parties. But so, if they claim to follow the iso3166-1 alpha 2 standard there shouldn't really be any problem one have to overcome.

@flaeppe flaeppe closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants