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

isPassportNumber isnot exactlly #1686

Closed
steavengong opened this issue Jul 2, 2021 · 1 comment · Fixed by #1714
Closed

isPassportNumber isnot exactlly #1686

steavengong opened this issue Jul 2, 2021 · 1 comment · Fixed by #1714

Comments

@steavengong
Copy link

Describe the bug
isPassportNumber isnot exactlly for countryCode with CN

Examples
1.My passport no is start with ED followed by 7-digits it's error
you can change
(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)

2.Is any code can be HK、TW passport validator??

Additional context
Validator.js version: 13.6.0
Node.js version: v14.16.0
OS platform: macOS

@rubiin
Copy link
Member

rubiin commented Jul 5, 2021

let me test it out

anirudhgiri added a commit to anirudhgiri/validator.js that referenced this issue Aug 20, 2021
profnandaa pushed a commit that referenced this issue Sep 26, 2021
* fix: (isPassportNumber) fix regex for CN

* feat(isPassportNumber): fix regex for CN (#1686)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants