Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(isIdentityCard): add NL locale #2338

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RobinvanderVliet
Copy link
Contributor

@RobinvanderVliet RobinvanderVliet commented Nov 12, 2023

I have added a Dutch validation method to isIdentityCard.

References

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

Copy link

codecov bot commented Nov 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (b958bd7) to head (9d04193).
Report is 22 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2338   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         107      107           
  Lines        2454     2458    +4     
  Branches      619      621    +2     
=======================================
+ Hits         2453     2457    +4     
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one, the BSN is comparable to the American Social Security Number, but it's not the document number of Dutch identity cards. We might need to do further review on what the isIdentityCard really validates and possibly change the name so it is clear.
In my view right now we should have three validators; isIdentityCard, isPassportNumber and a third that checks for cases like the BSN and the SSN

@RobinvanderVliet
Copy link
Contributor Author

Not sure about this one, the BSN is comparable to the American Social Security Number, but it's not the document number of Dutch identity cards. We might need to do further review on what the isIdentityCard really validates and possibly change the name so it is clear. In my view right now we should have three validators; isIdentityCard, isPassportNumber and a third that checks for cases like the BSN and the SSN

I have checked some of the already implemented validator functions in the file, and the validator functions for Finland, Israel, Norway and Spain all seem to check national ID numbers. There might be others that are similar, I have not had time to check them all.

Similar to Dutch cards, Norwegian ID cards have the document number on the front side and the national ID number on the reverse side. The Norwegian validator checks the national ID number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants