Marketto / codice-fiscale-utils

Utility to handle Italian Codice Fiscale
MIT License
24 stars 10 forks source link

matchFirstName fails with names with less than three consonants #86

Closed condesully closed 1 year ago

condesully commented 1 year ago

Environment:

Platform [ ] nodeJs [X] Web/Browser

Issue description: The method matchFirstName of codiceFiscale validator fails to validate first names composed with less than three consonants.

Steps to reproduce the problem:

  1. Given the VAT BRLGNE39M19A237C
  2. Given the first name "Eugenio"
  3. Try to validate VatValidator.codiceFiscale("BRLGNE39M19A237C").matchFirstName("Eugenio");
  4. The result is false

Expected behavior It should be true

Other Using codice-fiscale-utils v2.0.4