VatNumberValidation 1.0.2
dotnet add package VatNumberValidation --version 1.0.2
NuGet\Install-Package VatNumberValidation -Version 1.0.2
<PackageReference Include="VatNumberValidation" Version="1.0.2" />
<PackageVersion Include="VatNumberValidation" Version="1.0.2" />
<PackageReference Include="VatNumberValidation" />
paket add VatNumberValidation --version 1.0.2
#r "nuget: VatNumberValidation, 1.0.2"
#:package VatNumberValidation@1.0.2
#addin nuget:?package=VatNumberValidation&version=1.0.2
#tool nuget:?package=VatNumberValidation&version=1.0.2
VatNumberValidation
VatNumberValidation is a free package to validate workd Vat Numbers.
Country List
Below you have a list of actual countries supported by actual version.
EUROPE
| Country | ISO2 | ISO3 | ISO Nr | Reg. Expression | Check digit | External Service |
|---|---|---|---|---|---|---|
| Austria | AT | AUT | 040 | Yes | No | Yes with Vies |
| Belgium | BE | BEL | 056 | Yes | Yes | Yes with Vies |
| Bulgaria | BG | BGR | 100 | Yes | No | Yes with Vies |
| Croatia | HR | HRV | 191 | Yes | No | Yes with Vies |
| Cyprus | CY | CYP | 196 | Yes | No | Yes with Vies |
| Czech Republic | CZ | CZE | 203 | Yes | No | Yes with Vies |
| Denmark | DK | DNK | 208 | Yes | No | Yes with Vies |
| Estonia | EE | EST | 233 | Yes | No | Yes with Vies |
| Finland | FI | FIN | 246 | Yes | No | Yes with Vies |
| France | FR | FRA | 250 | Yes | No | Yes with Vies |
| Germany | DE | DEU | 276 | Yes | No | Yes with Vies |
| Greece | GR | GRC | 300 | Yes | No | Yes with Vies |
| Hungary | HU | HUN | 348 | Yes | No | Yes with Vies |
| Ireland | IE | IRL | 372 | Yes | No | Yes with Vies |
| Italy | IT | ITA | 380 | Yes | No | Yes with Vies |
| Latvia | LV | LVA | 428 | Yes | No | Yes with Vies |
| Lithuania | LT | LTU | 440 | Yes | No | Yes with Vies |
| Luxembourg | LU | LUX | 442 | Yes | No | Yes with Vies |
| Malta | MT | MLT | 470 | Yes | No | Yes with Vies |
| Netherlands | NL | NLD | 528 | Yes | No | Yes with Vies |
| Poland | PL | POL | 616 | Yes | No | Yes with Vies |
| Portugal | PT | PRT | 620 | Yes | No | Yes with Vies |
| Romania | RO | ROU | 642 | Yes | No | Yes with Vies |
| Slovakia | SK | SVK | 703 | Yes | No | Yes with Vies |
| Slovenia | SI | SVN | 705 | Yes | No | Yes with Vies |
| Spain | ES | ESP | 724 | Yes | No | Yes with Vies |
| Sweden | SE | SWE | 752 | Yes | No | Yes with Vies |
| United Kingdom | GB | GBR | 826 | Yes | No | No |
AMERICA
| Country | ISO2 | ISO3 | ISO Nr | Reg. Expression | Check digit | External Service |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| Argentina | AR | ARG | 032 | Yes | Yes | No |
| Brazil | BR | BRA | 076 | Yes | Yes | No |
| Canada | CA | CAN | 124 | Yes | Yes | No |
| Mexico | MX | MEX | 484 | Yes | Yes | No |
| Peru | PE | PER | 604 | Yes | No | Yes with Aduanet Perú |
| United States | US | USA | 840 | Yes | No | No |
NOTE: For Mexico, I think exists a web service to validate RFC with real list. If you know it, please write me to include it on this package.
ASIA
| Country | ISO2 | ISO3 | ISO Nr | Reg. Expression | Check digit | External Service |
|---|---|---|---|---|---|---|
| India | IN | IND | 356 | Yes | No | No |
Input
Only 2 values are needed
VatNumber: You can include any value
Country: You can use ISO3166-1 with 2 characters, 3 characters or Number. See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
Output
The response has next values:
Basic Information
- VatNumber: Vat Number used
- VatName: Vat name using Country language
- CountryCode2: 2-digit iso code of the selected country
- CountryCode3: 3-digit iso code of the selected country
- CountryCodeISONumber: iso numeric code of the selected country
Basic check-ups
- CountryCodeValid: Returns a boolean when the country can be checked on actual package
Regular expression check-ups
- RegularExpresionHasValidation: The Vat Number has been validate using a regular expression. See table above.
- RegularExpresionResult: Result of this validation. Null if the validation is not done
Check digits check-ups
- ControlDigitsHasValidation: The Vat Number has been validate using a regular expression. See table above.
- ControlDigitsResult: Result of this validation. Null if the validation is not done
External Service check-ups
For some countries there are online web service which provide information if the vat number exists.
- ExternalServiceHasValidation: The Vat Number has been validate using the system.
- ExternalServiceResult: Result of this validation. Null if the validation is not done
- ExternalServiceErrorInfo: When apply the Service validation
- ExternalServiceName: The provider of the information
Colaborate!
If some country is not here and you have information for this Country, please write me! I will be happy to add new countries and be able to help other colleagues.
About me
I'm Jorge Portero Guijarro. Developer and Analyst of C# web applications.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.ServiceModel.Duplex (>= 4.7.0)
- System.ServiceModel.Http (>= 4.7.0)
- System.ServiceModel.NetTcp (>= 4.7.0)
- System.ServiceModel.Security (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added Countries
EUROPE
Austria,Belgium,Bulgaria,Croatia,Cyprus,Czech Republic,Denmark,Estonia,Finland,France,Germany,Greece,Hungary,Ireland,Italy,Latvia,Lithuania,Luxembourg,Malta,Netherlands,Poland,Portugal,Romania,Slovakia,Slovenia,Spain,Sweden,United Kingdom,
AMERICA
Argentina,Brazil,Canada,Mexico,Peru,USA
ASIA
India