Skip to content

Add Oman VAT number (VATIN) validation#505

Open
DMZ22 wants to merge 1 commit into
arthurdejong:masterfrom
DMZ22:add-om-vat
Open

Add Oman VAT number (VATIN) validation#505
DMZ22 wants to merge 1 commit into
arthurdejong:masterfrom
DMZ22:add-om-vat

Conversation

@DMZ22

@DMZ22 DMZ22 commented Jul 24, 2026

Copy link
Copy Markdown

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

  • Name: VATIN (VAT identification number), issued by the Oman Tax Authority.
  • Structure: the letters OM followed by 10 digits — 12 characters in total.
  • No check digit. Numbers are verified online via the tax authority portal, so this module validates length and formatting only (in the spirit of e.g. stdnum/gh/tin.py, which is also structural).

Sources / validation service

Tests

  • Module docstring covers valid input, whitespace/lowercase normalisation, missing prefix, wrong length and non-digit tail.
  • tests/test_om_vat.doctest bulk-validates real numbers taken from published Omani VAT certificates (e.g. OM1100006083, OM1100018164, OM1100005523). Every line of the module is exercised.

Note

The #408 issue 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 an om/tin.py, if you'd prefer.

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).
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

Successfully merging this pull request may close these issues.

1 participant