se-panfilov / jsvat

Check the validity of the format of an EU VAT number

Home Page:http://se-panfilov.github.io/jsvat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Italy VAT number validator - office number

marcin-chwedczuk-meow opened this issue · comments

Currently library is using the following condition to check office code part of VAT number:

// italy.js
    temp = +vat.slice(7, 10)
    if ((temp < 1) || (temp > 201) && temp !== 999 && temp !== 888) {
      return false
    }

According to Wikipedia (https://it.wikipedia.org/wiki/Partita_IVA) the range should be 1-121. BTW I am not Italian so I am not 100% sure, just the other backend VAT validation library that I use accepts only vats with office number in range 1-121 and 888 and 999. Is this a mistake or is my other validation library not up to date?