kamaladafrica / codice-fiscale

Yet Another Codice Fiscale Calculator
Apache License 2.0
10 stars 8 forks source link

Missing Codice Belfiore for suppressed countries #30

Closed Giackgamba closed 1 year ago

Giackgamba commented 1 year ago

Describe the bug Some (or all) suppressed states/contries are not present in the esteri.csv file

To Reproduce Steps to reproduce the behavior:

  1. Given codice fiscale TTVNLA61B15Z135B
  2. When CodiceFiscale.isFormatValid
  3. Then Fiscal code TTVNLA61B15Z135B invalid. Reason: not found: Z135 (sry, I'm not sure this is the actual error output from this library or we somehow reformat it.)

Expected behavior Z135 is the Belfiore code for the URSS until 1991 (or 1992). https://www.codicefiscaleonline.com/codice_inverso.php recognizes the fiscal code as correct.

Additional context I found this file from istat (from this page) where there is a list of suppressed state.

If that's ok with you I can try to conform it to the esteri.csv file format.

kamaladafrica commented 1 year ago

Sure, you can open a pull request to fix the issue. You'll want to write appropriate tests as well.