Under heavy construction
#jsvat
Demo: http://se-panfilov.github.io/jsvat
Check the validity of the format of an EU VAT number specified.
What is it?
jsvat is a small library to check validity of European (and few non-eu) VAT number. (learn more about VAT)
How does jsvat check the validity?
There is 2-step check:
- Compare with list of Regexps;
For exapmle regexp for austria is /^(AT)U(\d{8})$/
.
Looks like ATU99999999
is valid (it's successfied the regexp), but actually it's should be invalid.
- Some magic mathematical counting;
Here we make some mathematical calculation (different for each country).
After that we may be sure that ATU99999999
and for example ATV66889218
isn't valid, but ATU12011204
is valid.
Source of inspiration:
Based on this great work: http://www.braemoor.co.uk/software/vat.shtml
At the moment the code was in public access without any license information.
I'm totally rewrite all the code.
Browsers Supports
...
(unknown yet, but modern browsers should support it as well)
List of supported Countries:
- Austria
- Belgium
- Bulgaria
- Switzerland
- Cyprus
- Czech Republic
- Germany
- Denmark
- Greece
- Spain
- Europe
- Finland
- France
- United Kingdom
- Croatia
- Hungary
- Ireland
- Italy
- Latvia
- Lithunia
- Luxembourg
- Malta
- Netherlands
- Norway
- Poland
- Portugal
- Romania
- Russia Federation
- Serbia
- Slovenia
- Slovakia republic
- Sweden
LICENSE
MIT: https://github.com/se-panfilov/jsvat/blob/master/LICENSE