Skip to content

Commit

Permalink
comments and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
homebeaver committed Oct 3, 2024
1 parent 2954d1e commit 108ecca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ and Amazon (AWS) EU826009064.
// optional Group for Temporarily Registered Taxpayers with 12 digits, C11==1
new Validator("LT", 14, "LT\\d{9}([0-9]1[0-9])?"), // Lithuania LT99999999p or 12 digits
new Validator("LU", 13, "LU\\d{8}"), // Luxembourg LU999999pp
new Validator("LV", 13, "LV[4-9]\\d{10}"), // Latvia LV9999999999p
// first digit [4-9] : legal entity , [0-3] : natural person
new Validator("LV", 13, "LV\\d\\d{10}"), // Latvia LV9999999999p
new Validator("MT", 14, "MT\\d{8}"), // Malta MT999999pp
new Validator("NL", 14, "NL\\d{9}B\\d{2}"), // Netherlands NL99999999pB01
new Validator("PL", 12, "PL\\d{10}"), // Poland PL999999999p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,18 @@ public class VATINValidatorTest {
"LT100014579016", // Senoji rotonda
"LU25180625", // snct.lu
"LV40003567907", // legal entity Pasažieru vilciens
// TODO "LV07091910933", // Natural person, born 1919
// "LV01010020932", // Natural person, born 2000/01/01
// "LV32053410932", // Natural person, no birthday coded

"LV07091910933", // Natural person, born 1919
"LV01010020932", // Natural person, born 2000/01/01
"LV32053410932", // Natural person, no birthday coded
"MT20200019", // BAJADA NEW ENERGY LIMITED, MRS3000 Marsa
"NL003660564B01", // STAM + DE KONING BOUW B.V. EINDHOVEN
"NL004495445B01", // OPENJONGERENVERENIGING DE KOORNBEURS, DELFT
"PL1060000062", // aus https://pl.wikipedia.org/wiki/Numer_identyfikacji_podatkowej
"PT510728189", // CLARANET II SOLUTIONS, S.A. PORTO
"RO27825131", // NUTRISOYA SRL
"RO6255950", // P L NORIS SRL
"SE556680144401", // XLN Audio AB, STOCKHOLM

"SI21649405", // STANOVANJSKO PODJETJE KONJICE D.O.O.
"SK2120567108", // Markon s.r.o. Bratislava
"XI110305878", // https://www.bullseyecountrysport.co.uk/contact-us-2-w.asp
Expand All @@ -121,8 +122,6 @@ public class VATINValidatorTest {
"GR023456780", // falscher Prefix, sollte EL sein!
"ESA10215", // too short
"LT100008668621", // C11 is not 1
"LV07091910933", // aus SAP Format 2: Natural person
"LV07091910931", // mit anderer Prüfziffer
"LV18097230924", // invalid century
"NL004495445B00", // Suffix "00"
"RO027825131", // Must not start with 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ public class VATidSECheckDigitTest extends AbstractCheckDigitTest {
without last 2 chars, which are constant "01" - will be checked as regex in VATINValidator
SE 1366959755 01 : valide, aber ungültig. Quelle bmf.gv.at
SE 5561888404 01 : gültig OLLE SVENSSONS PARTIAFFÄR AKTIEBOLAG. Quelle pruefziffernberechnung.de
SE 1234567897 01 : valide, aber ungültig. Quelle https://old.formvalidation.io/validators/vat/
SE 5560528514 01 : gültig Scandinavian Eyewear AB, JÖNKÖPING. Quelle https://www.adresslabor.de/en/products/vat-id-no-check.html
Beispiele
SE 1366959755 23 : nur erster Teil valide, suffix muss 01 sein, ungültig. Quelle pruefziffernberechnung.de
SE 5561888404 01 : gültig OLLE SVENSSONS PARTIAFFÄR AKTIEBOLAG. Quelle bmf.gv.at
SE 1234567897 01 : valide, aber ungültig. Quelle formvalidation.io
SE 5560528514 01 : gültig Scandinavian Eyewear AB, JÖNKÖPING. Quelle adresslabor.de
SE 5566801444 01 : gültig XLN Audio AB, STOCKHOLM
SE 5565102471 01 : gültig amo kraftkabel AB, ALSTERMO
*/
@BeforeEach
protected void setUp() {
Expand Down

0 comments on commit 108ecca

Please sign in to comment.