viruschidai / validate-vat

A European VAT number validating lib.
115 stars 39 forks source link

How to process other countries #30

Closed koesper closed 3 years ago

koesper commented 5 years ago

The VIES check is only usable for EU countries, which makes complete sense. I was wondering what would be the best way to process other countrycodes.

For instance, CHE100416306IVA is not valid according to the VIES check, but it might very well be valid. (Switzerland is in europe, but not in the EU)

Should i check the countrycodes beforehand? or is this something we should incorperate into this module?

gempain commented 4 years ago

I think this is out of the scope of this module. The VIES service, as you rightly said, only makes sense for EU VAT numbers. Switzerland not being part of the EU, whatever VAT number they are using is out of the jurisdiction of the EU (as an organization). Switzerland (or any country with a VAT that is not an EU state member) probably provides its own validation service.

viruschidai commented 3 years ago

what @gempain said is true. This module just simplify the call to the EU VIES SOAP server, whatever countries are supported by EU VIES SOAP server is out of control of this module.