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

isPassport - Azerbaijan validation fails #2274

Open
amaliacatalina opened this issue Aug 24, 2023 · 4 comments
Open

isPassport - Azerbaijan validation fails #2274

amaliacatalina opened this issue Aug 24, 2023 · 4 comments
Labels

Comments

@amaliacatalina
Copy link
Contributor

Describe the bug
The validation for an Azerbaijan passport number, fails. After a little research, I found out this:

"Each passport, no matter which category it belongs to, comes with a unique number. It starts with a letter followed by 8 digits,..."

The validation now, in Regex is : [A-Z]{2,3}\d{7,8}$, and i think it should be [A-Z]{1}\d{8}$. Correct me if i'm wrong?

@WikiRik
Copy link
Member

WikiRik commented Aug 25, 2023

The PR that added the regex (#2061) did not have any source. The page where you got that quote from is likely https://www.byevisa.com/azerbaijan-passport/ but that also does not have a source. The Immigration and Refugee Board of Canada does have a link to Keesing Reference System (not freely accessible) which mentions that you are correct. See https://irb.gc.ca/en/country-information/rir/Pages/index.aspx?doc=455354&pls=1 and https://www.refworld.org/docid/53b14c614.html

Feel free to open a PR that fixes this.

amaliacatalina added a commit to amaliacatalina/validator.js that referenced this issue Aug 25, 2023
Added the updated Azerbaijan passport validation:
See issue:
validatorjs#2274
@amaliacatalina amaliacatalina mentioned this issue Sep 7, 2023
4 tasks
@stickyrst
Copy link

#2284

This pull fixes the issue but it was not approved/merged yet. Is there any chance anyone can approve and merge it?

@stickyrst
Copy link

Fix still not merged

@stickyrst
Copy link

Still not merged

profnandaa pushed a commit that referenced this issue Apr 25, 2024
* Update isPassportNumber.js

Added the updated Azerbaijan passport validation:
See issue:
#2274

* Update validators.test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants