Socket
Socket
Sign inDemoInstall

angular-jsvat

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-jsvat

Check the validity of the format of an EU VAT number specified


Version published
Weekly downloads
38
decreased by-7.32%
Maintainers
1
Install size
174 kB
Created
Weekly downloads
 

Readme

Source

devDependency Status

angular-jsvat

Demo and Examples

Check the validity of the format of an EU VAT number. No dependencies (except angularjs of course).

What is it?

Angular-js wrapper for jsvat

jsvat is a small library to check validity of European (and few non-eu) VAT number. (learn more about VAT) jsvat use 2-step check (see below) and didn't make any request for external resources.

Each country has own regexp for VAT number and different math-logic of number calculating.

Installation

  1. Bower

bower i angular-jsvat --save

  1. NPM (node.js)

npm i angular-jsvat --save

  1. Directly download one of the latest releases:

https://github.com/se-panfilov/angular-jsvat/releases

How does jsvat check the validity?

There is 2-step check:

  1. Compare with list of Regexps;

For example 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.

  1. Some magic mathematical counting;

Here we make some mathematical calculation (different for each country). After that we may be sure that ATU99999999and 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

Keywords

FAQs

Last updated on 24 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc