validator.js
validator.js copied to clipboard
Added support for ur-PK(Pakistan) in isIdentityCard
Add a regex pattern for validating valid Pakistani Computerized National Identity Cards (CNICs):
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
- [x] References provided in PR (where applicable)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.95%. Comparing base (
b958bd7
) to head (e46885f
). Report is 33 commits behind head on master.
:exclamation: Current head e46885f differs from pull request most recent head 622e39c
Please upload reports for the commit 622e39c to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## master #2291 +/- ##
==========================================
- Coverage 99.95% 99.95% -0.01%
==========================================
Files 107 107
Lines 2454 2453 -1
Branches 619 619
==========================================
- Hits 2453 2452 -1
Partials 1 1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@WikiRik I've adopted a convention familiar to many developers, using the initial of the national language followed by the initial of the country name. Please Check out the source behind this intriguing regex pattern: CNIC regex format
@WikiRik Hi is there any other fixes needed here.
@Daniyal-Qureshi could you also mention the source ?
Hi @rubiin I have used following sources.
- https://www.geo.tv/latest/250118-mystery-behind-13-digit-cnic-number
- https://en.wikipedia.org/wiki/CNIC_(Pakistan)
@rubiin I have changed the local from ur-PK
to PK
, please review.