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

Added support for PK(Pakistan) in isIdentityCard #2291

Merged

Conversation

Daniyal-Qureshi
Copy link
Contributor

Add a regex pattern for validating valid Pakistani Computerized National Identity Cards (CNICs):

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 Sep 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (b958bd7) to head (e46885f).
Report is 33 commits behind head on master.

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              

☔ 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.

Please use 'PK' as locale instead of 'ur-PK'
What's the source for the regex?

@Daniyal-Qureshi
Copy link
Contributor Author

@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
Copy link
Contributor Author

@WikiRik Hi is there any other fixes needed here.

@rubiin rubiin requested a review from WikiRik May 30, 2024 17:34
@rubiin
Copy link
Member

rubiin commented May 30, 2024

@Daniyal-Qureshi could you also mention the source ?

@rubiin rubiin added the 🧹 needs-update For PRs that need to be updated before landing label Jun 1, 2024
@Daniyal-Qureshi
Copy link
Contributor Author

Hi @rubiin I have used following sources.

Copy link
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

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

ur-PK you could simply do as PK as suggested by @WikiRik
rest looks good for merge imo

@Daniyal-Qureshi
Copy link
Contributor Author

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

@rubiin rubiin added 🧹 needs-update For PRs that need to be updated before landing ✅ LGTM and removed 🧹 needs-update For PRs that need to be updated before landing labels Jun 2, 2024
@rubiin rubiin requested a review from profnandaa June 2, 2024 11:18
@Daniyal-Qureshi Daniyal-Qureshi changed the title Added support for ur-PK(Pakistan) in isIdentityCard Added support for PK(Pakistan) in isIdentityCard Jun 2, 2024
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contrib! 🎉

@profnandaa profnandaa merged commit 08257b5 into validatorjs:master Jun 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants