validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

Added support for ur-PK(Pakistan) in isIdentityCard

Open Daniyal-Qureshi opened this issue 1 year ago • 2 comments

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)

Daniyal-Qureshi avatar Sep 27 '23 17:09 Daniyal-Qureshi

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.

codecov[bot] avatar Sep 27 '23 17:09 codecov[bot]

@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

Daniyal-Qureshi avatar Sep 29 '23 00:09 Daniyal-Qureshi

@WikiRik Hi is there any other fixes needed here.

Daniyal-Qureshi avatar May 27 '24 08:05 Daniyal-Qureshi

@Daniyal-Qureshi could you also mention the source ?

rubiin avatar May 30 '24 17:05 rubiin

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)

Daniyal-Qureshi avatar Jun 02 '24 10:06 Daniyal-Qureshi

@rubiin I have changed the local from ur-PK to PK, please review.

Daniyal-Qureshi avatar Jun 02 '24 10:06 Daniyal-Qureshi