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

fix(isPassportNumber): fix regex Azerbaijan #2284

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/isPassportNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const passportRegexByCountryCode = {
AR: /^[A-Z]{3}\d{6}$/, // ARGENTINA
AT: /^[A-Z]\d{7}$/, // AUSTRIA
AU: /^[A-Z]\d{7}$/, // AUSTRALIA
AZ: /^[A-Z]{2,3}\d{7,8}$/, // AZERBAIJAN
AZ: /^[A-Z]{1}\d{8}$/, // AZERBAIJAN
BE: /^[A-Z]{2}\d{6}$/, // BELGIUM
BG: /^\d{9}$/, // BULGARIA
BR: /^[A-Z]{2}\d{6}$/, // BRAZIL
Expand Down
6 changes: 3 additions & 3 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2926,11 +2926,11 @@ describe('Validators', () => {
validator: 'isPassportNumber',
args: ['AZ'],
valid: [
'AZE16175905',
'AA1617595',
'A16175905',
'A16175958',
],
invalid: [
'A12345843',
'AZ1234584',
],
});

Expand Down
Loading