Marketto / codice-fiscale-utils

Utility to handle Italian Codice Fiscale
MIT License
25 stars 11 forks source link

matchFirstName fail with a complex first name #58

Closed berryred0292 closed 3 years ago

berryred0292 commented 3 years ago

Environment:

Platform [ ] nodeJs [x] Web/Browser

Issue description: The method matchFirstName of codiceFiscale validator fail to validate the a first name composed with 3 names .

Steps to reproduce the problem:

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

Expected behavior It should be true

Other Using codice-fiscale-utils v2.0.2