reducktion / socrates

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

[v1.3.0] Incorrect ID validation for Belgium. #82

Closed YvesBos closed 3 years ago

YvesBos commented 3 years ago

Related to #75, I see some problems with the current implementation:

See https://github.com/reducktion/socrates-java/pull/36/files for an implementation in the Java fork that does take these things into account.

I'm up for fixing it if you want, please confirm.

AlexOlival commented 3 years ago

~Hi, please refer to #76~ ~It seems like there is a problem with the "ID" we're using itself 😅~

Edit: I'm dumb.

YvesBos commented 3 years ago

This specific issue is unrelated, the Belgian National Number (ID) is used on both the social security card and the official identity card.

The ID you're using is the correct one for Belgium. The validation logic as is just does not take into account the 2 things I rased in the issue.

AlexOlival commented 3 years ago

@YvesBos apologies... it was a long day and I was stuck in Luxembourg mode.

By all means, if you can put a PR up, please do! Target the 1.2 branch please

AlexOlival commented 3 years ago

@YvesBos I have fixed the branch name because it was erroneously targetting a tag. Please change the merge target to release-1.3.0

AlexOlival commented 3 years ago

Fixed by #91