Skip to content

Wrong VATIN validation on duplicate country code #420

Description

@simonphilips

There seems to be a bug in the VATIN validation when you duplicate the country code:

In [3]: stdnum.vatin.is_valid("BE 0308.357.159")
Out[3]: True

In [4]: stdnum.vatin.is_valid("BE BE 0308.357.159")
Out[4]: True

In [5]: stdnum.eu.vat.is_valid("BE BE 0308.357.159")
Out[5]: False

[4] should have the same result as [5].

This is also happening for Dutch (NL) numbers but not for Mexican (MX) numbers for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions