diff --git a/src/lib/isPostalCode.js b/src/lib/isPostalCode.js index 103656205..437dbe622 100644 --- a/src/lib/isPostalCode.js +++ b/src/lib/isPostalCode.js @@ -28,7 +28,7 @@ const patterns = { EE: fiveDigit, ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, FI: fiveDigit, - FR: /^\d{2}\s?\d{3}$/, + FR: /^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/, GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, GR: /^\d{3}\s?\d{2}$/, HR: /^([1-5]\d{4}$)/, diff --git a/test/validators.test.js b/test/validators.test.js index 8335477a2..4fb248e2f 100644 --- a/test/validators.test.js +++ b/test/validators.test.js @@ -12514,10 +12514,16 @@ describe('Validators', () => { locale: 'FR', valid: [ '75008', + '44522', + '38499', + '39940', + '01000', + ], + invalid: [ '44 522', - '98025', '38 499', - '39940', + '96000', + '98025', ], }, {