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

isPassport - Azerbaijan validation fails

Open amaliacatalina opened this issue 1 year ago • 4 comments

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?

amaliacatalina avatar Aug 24 '23 11:08 amaliacatalina

The PR that added the regex (https://github.com/validatorjs/validator.js/pull/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.

WikiRik avatar Aug 25 '23 10:08 WikiRik

https://github.com/validatorjs/validator.js/pull/2284

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

stickyrst avatar Sep 25 '23 12:09 stickyrst

Fix still not merged

stickyrst avatar Oct 20 '23 09:10 stickyrst

Still not merged

stickyrst avatar Nov 08 '23 21:11 stickyrst

closing as the PR was merged

rubiin avatar May 10 '24 06:05 rubiin