Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with EU-VAT validation #154

Open
dariasamo opened this issue Feb 12, 2024 · 0 comments
Open

Problems with EU-VAT validation #154

dariasamo opened this issue Feb 12, 2024 · 0 comments

Comments

@dariasamo
Copy link

Hi,

There are 2 problems with EU VAT validation

  1. validateVat function expects vat_number parameter to NOT contain country prefix, otherwise it fails with, i.e. Server side VAT Regex validation failed against regex (CZ)?[0-9]{8,10} for country code CZ But the (CZ)?[0-9]{8,10} regex assumes that CZ prefix should be allowed. It looks like there is some problem on Chargebee side that it probably concatenates country code and VAT number containing country code before testing it against this regex. Otherwise it should pass if this particular regex is used.
  2. Greece should use EL prefix for VAT numbers. See here. Right now vatValidate will only validate correctly if country param is set to GR.
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

No branches or pull requests

1 participant