Skip to content

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)

@codecov
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (88e0d3d) to head (73093bc).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2338   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2590      2599    +9     
  Branches       659       661    +2     
=========================================
+ Hits          2590      2599    +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants