feat(isTaxID): Accept ISO 3166-1 alpha-2 country codes
Changes accepted locale format for isTaxID validator
Resolves #1707
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
Codecov Report
Merging #1756 (b9fa8c7) into master (13651ea) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #1756 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2029 2027 -2
Branches 457 458 +1
=========================================
- Hits 2029 2027 -2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/lib/isTaxID.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 13651ea...b9fa8c7. Read the comment docs.
Aliases everywhere🙃
@tux-tn understood- I can provide a fix supporting both variants
@tux-tn it makes sense to me, definitely smarter😃
@tux-tn implemented your solution, tests pass and looks much better 😄
@tux-tn I reverted reordering (but I kept renaming of the functions) and simplified the tests as requested. Can you only advise me what to do with the Readme/ documentation because I'm not sure if we are on the same page 😅
Thank you for the efforts @bartmalanczuk 👍 I really appreciate it !
As @fedeci suggested we probably want to add a paragraph to tell that locales with ISO 639 country codes are supported but will be removed in the future.
I suggest to wait for @profnandaa review. He will probably have a suggestion concerning the wording or what to do concerning the depreciation.
Thanks for the awesome work @bartmalanczuk and @tux-tn. Please merge!
cc @profnandaa any feedback on this?