feat(isIdentityCard): Add PL locale#1745
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1745 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2015 2027 +12
Branches 454 456 +2
=========================================
+ Hits 2015 2027 +12
Continue to review full report at Codecov.
|
I checked and it would fit there. I will add this PESEL validator to isIdentityCard. |
tux-tn
left a comment
There was a problem hiding this comment.
Thank you for your PR @wiktorwojcik112
Totally agree with @fedeci this validator should be added as a locale to isIdentityCard. Please make the necessary changes and add tests for the uncovered line in your code
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
There was a problem hiding this comment.
Thank you for updating your PR @wiktorwojcik112 can you please fix the linter issue and add the missing test cases to bring back coverage to 100%.
I suggest you run tests locally before pushing new code (using yarn test or npm run test)
EDIT: Can you please change the PR title to specify you are adding a new locale to isIdentityCard and not a new validator (The PR title will be the commit message when the PR is merged and the actual title is misleading)
|
Ok. I fixed linter error and changed title, but I still can't figure out how to solve coverage issue. |
That's tricky but you need to find a test example where the last digit of PESEL number equals 10 minus your modulo. |
Everything should be good now. |
tux-tn
left a comment
There was a problem hiding this comment.
Thank you @wiktorwojcik112 can you please address my latest comment concerning istanbul ignore else ?
Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
tux-tn
left a comment
There was a problem hiding this comment.
LGTM 🎉 Thank you for taking the time to quickly address all the comments
It was nice working with you. Thank you all for help. Take care! |
profnandaa
left a comment
There was a problem hiding this comment.
LGTM. thanks for your contrib! 🎉
Add isPESEL validation.
PESEL is a polish national identification number. Validator checks whether provided string follows criteria of
valid PESEL.
Checklist