diff --git a/src/lib/isPassportNumber.js b/src/lib/isPassportNumber.js index 949e38211..4c38bfbbe 100644 --- a/src/lib/isPassportNumber.js +++ b/src/lib/isPassportNumber.js @@ -50,7 +50,7 @@ const passportRegexByCountryCode = { PL: /^[A-Z]{2}\d{7}$/, // POLAND PT: /^[A-Z]\d{6}$/, // PORTUGAL RO: /^\d{8,9}$/, // ROMANIA - RU: /^\d{2}\d{2}\d{6}$/, // RUSSIAN FEDERATION + RU: /^\d{9}$/, // RUSSIAN FEDERATION SE: /^\d{8}$/, // SWEDEN SL: /^(P)[A-Z]\d{7}$/, // SLOVANIA SK: /^[0-9A-Z]\d{7}$/, // SLOVAKIA diff --git a/test/validators.js b/test/validators.js index 0f1b14e70..e258c0f81 100644 --- a/test/validators.js +++ b/test/validators.js @@ -3078,14 +3078,16 @@ describe('Validators', () => { validator: 'isPassportNumber', args: ['RU'], valid: [ - '26 32 636829', - '0121 345321', - '4398636928', + '2 32 636829', + '012 345321', + '439863692', ], invalid: [ - 'AZ 2R YU46J', - '012A 3D5321', - 'SF233D532T', + 'A 2R YU46J0', + '01A 3D5321', + 'SF233D53T', + '12345678', + '1234567890', ], });