reducktion / socrates

PHP package to Validate and Extract information from National Identification Numbers.
MIT License
47 stars 4 forks source link

Luxembourg ID validation #76

Closed anbernar closed 1 year ago

anbernar commented 3 years ago

According to this documentation and this wikipedia page, the Luxembourg ID validation is performed by:

  1. computing check digit, based on the Luhn Algorithm and the first 11 digits of the ID, and compare it with the 12nd digit of the ID.
  2. computing check digit, based on the Verhoeff Algorithm and the first 11 digits of the ID, and compare it with the 13rd digit of the ID.

This is not what is happening in: https://github.com/reducktion/socrates/blob/b55f58117a171df1b8180183479a27c29cdd496a/src/Core/Luxembourg/LuxembourgIdValidator.php#L29

I've been trying to get some real ID's to test it, but I wasn't successful.

Can you check?

AlexOlival commented 3 years ago

Sounds like we're dealing with either two different IDs altogether or a new version of the ID number 🧐

I think our best bet is to ask a national

AlexOlival commented 3 years ago

So I asked a friend and it seems we have ourselves a pickle. According to her, the ID format is "AB1CDEF23".

What we have is the social security number. Seems like it's Google time for this one again @JoaoFSCruz... 🙁

JoaoFSCruz commented 3 years ago

Well, I guess it is 😅

If I find anything I'll post it here so we can be on the same page.

AlexOlival commented 1 year ago

We need to reimplement this validator from scratch