Validate VAT number. Support 35 countries.
Option | HTML attribute | Type | Description |
---|---|---|---|
country |
data-bv-vat-country |
String | An ISO-3166 country code. It's dynamic option. If it is not defined, it will be parsed from the VAT number |
message |
data-bv-vat-message |
String | The error message |
The validator supports the following countries (click the example VAT number to validate it):
No. | Country | Abbreviation VAT name | Country code | Example |
---|---|---|---|---|
1 | Austria | UID | AT | |
2 | Belgium | n° TVA / BTW-nr / Mwst-nr | BE | |
3 | Brazil | CNPJ | BR | |
4 | Bulgaria | ДДС номер | BG | |
5 | Croatia | PDV-ID; OIB | HR | |
6 | Cyprus | ΦΠΑ | CY | |
7 | Czech Republic | DIČ | CZ | |
8 | Denmark | CVR | DK | |
9 | Estonia | KMKR | EE | |
10 | Finland | ALV nro | FI | |
11 | France | n° TVA | FR | |
12 | Germany | USt-IdNr. | DE | |
13 | Greece | ΑΦΜ | GR / EL | |
14 | Hungary | ANUM | HU | |
15 | Iceland | VSK | IS | |
16 | Ireland | VAT no | IE | |
17 | Italy | P.IVA | IT | |
18 | Latvia | PVN | LV | |
19 | Lithuania | PVM kodas | LT | |
20 | Luxembourg | No. TVA | LU | |
21 | Malta | Vat No. | MT | |
22 | Netherlands | Btw-nr. | NL | |
23 | Norway | Orgnr | NO | |
24 | Poland | NIP | PL | |
25 | Portugal | NIF / NIPC | PT | |
26 | Romania | CIF | RO | |
27 | Russia | ИНН | RU | |
28 | Serbia | PIB | RS | |
29 | Slovakia | IČ DPH | SK | |
30 | Slovenia | ID za DDV | SI | |
31 | South Africa | ZA | ||
32 | Spain | NIF / CIF | ES | |
33 | Sweden | Momsnr. | SE | |
34 | Switzerland | MWST / TVA / IVA | CH | |
35 | United Kingdom | VAT Reg No | GB |
<form id="vatForm" class="form-horizontal">
<div class="form-group">
<label class="col-lg-3 control-label">VAT number</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="vat" />
</div>
</div>
</form>
$(document).ready(function() {
$('#vatForm').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
vat: {
validators: {
vat: {
message: 'The VAT number is not valid'
}
}
}
}
});
});
The following validators might be useful to you: