Add Oman VAT number (VATIN) validation#505
Open
DMZ22 wants to merge 1 commit into
Open
Conversation
The Oman VAT identification number (VATIN), issued by the Oman Tax Authority, consists of the letters OM followed by 10 digits (12 characters in total). It has no check digit and is verified online through the tax authority portal, so this validates length and formatting. Partially addresses arthurdejong#408 (the VAT/VATIN form; the 7-digit entity "tax card number" is an unstructured all-digit sequence for which format validation adds little value).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially addresses #408 by adding the Oman VATIN — the VAT/Excise form of the Oman TIN, which is the one with a defined structure.
Format
OMfollowed by 10 digits — 12 characters in total.stdnum/gh/tin.py, which is also structural).Sources / validation service
Tests
tests/test_om_vat.doctestbulk-validates real numbers taken from published Omani VAT certificates (e.g.OM1100006083,OM1100018164,OM1100005523). Every line of the module is exercised.Note
The
#408issue also mentions a 7-digit "tax card number" for entities. I left that out: it's an unstructured all-digit sequence with no fixed length constraint or check digit, so validating it adds little (per CONTRIBUTING's guidance on numbers whose only spec is "N digits"). Happy to add it, or to fold both into anom/tin.py, if you'd prefer.