pydantic / pydantic-extra-types

Extra Pydantic types.
MIT License
176 stars 47 forks source link

Add support for ISO 639-1 codes #161

Closed mdomke closed 4 months ago

mdomke commented 4 months ago

In #141 support for ISO 639-3 and 639-5 language codes was added, but the still very common ISO 639-1 alpha2 format was left out? Is there a reason for this? Otherwise, I could quickly add the missing ISO639_1 type. What do you think?

yezz123 commented 4 months ago

Hello @mdomke 👋🏻

Thanks for opening this. Yes, with pleasure, you can open a PR and add the ISO639_1 support.

mdomke commented 4 months ago

Erm... I think what I was looking for was already implemented in #153. In my opinion we can close this issue, because I second the suggestion to refactor the existing ISO639_3 and ISO639_5 classes into a LanguageAlpha3 class https://github.com/pydantic/pydantic-extra-types/pull/153#issue-2167674852 .