vat validator

Validate a VAT number

Options

Using with form field

The HTML attributes are used to set the validator options via the Declarative plugin

Name HTML attribute Type Description
country* data-fv-vat___country String or Function An ISO-3166 country code
message data-fv-vat___message String The error message

The validator supports the following countries (click the sample number to validate it):

# Country Abbreviation VAT system Country code Sample VAT Is it valid?
1 Argentina - AR 20267565393
2 Austria UID AT U13585627
3 Belgium n° TVA / BTW-nr / Mwst-nr BE 0428759497
4 Brazil CNPJ BR 16.727.230.0001-98
5 Bulgaria ДДС номер BG 175074752
6 Croatia PDV-ID; OIB HR 33392005962
7 Cyprus ΦΠΑ CY 10259033Z
8 Czech Republic DIČ CZ 640903926
9 Denmark CVR DK 13585628
10 Estonia KMKR EE 100594102
11 Finland ALV nro FI 20774740
12 France n° TVA FR 4Z123456782
13 Germany USt-IdNr. DE 136695978
14 Greece ΑΦΜ GR 123456781
15 Hungary ANUM HU 12892313
16 Iceland VSK IS 11111
17 Ireland VAT no IE 8D79738J
18 Italy P.IVA IT 00743110158
19 Latvia PVN LV 16137519997
20 Lithuania PVM kodas LT 100004801610
21 Luxembourg No. TVA LU 15027442
22 Malta Vat No. MT 11679113
23 Netherlands Btw-nr. NL 123456789B90
24 Norway Orgnr NO 988077917
25 Poland NIP PL 8567346216
26 Portugal NIF / NIPC PT 501964842
27 Romania CIF RO 18547291
28 Russia ИНН RU 7805145876
29 Serbia PIB RS 101134702
30 Slovakia IČ DPH SK 2022749619
31 Slovenia ID za DDV SI 50223055
32 South Africa - ZA 4012345678
33 Spain NIF / CIF ES B78640570
34 Sweden Momsnr. SE 123456789701
35 Switzerland MWST / TVA / IVA CH E107787577IVA
36 United Kingdom VAT Reg No GB 980780684
37 Venezuela RIF VE J000458323

Using with ES6 module

Basic Example

You can click on sample from the table above to see if it's a valid or invalid VAT.

ES6 Module Example

The following snippet shows how to use the vat validator with ES6 module:

More examples

Changelog

  • v1.7.0: Support new format of Dutch VAT number
  • v1.6.0: Fixed an issue that the country option isn't passed to the placeholder message

Related validators

The following validators might be useful to you.