diff --git a/src/lib/isPostalCode.js b/src/lib/isPostalCode.js index af906eff6..5b0b5cbeb 100644 --- a/src/lib/isPostalCode.js +++ b/src/lib/isPostalCode.js @@ -8,7 +8,7 @@ const sixDigit = /^\d{6}$/; const patterns = { AT: fourDigit, - AU: sixDigit, + AU: fourDigit, BE: fourDigit, CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, CH: fourDigit, diff --git a/test/validators.js b/test/validators.js index c4e8bb959..593c3b43d 100644 --- a/test/validators.js +++ b/test/validators.js @@ -4932,6 +4932,16 @@ describe('Validators', function () { it('should validate postal code', function () { const fixtures = [ + { + locale: 'AU', + valid: [ + '4000', + '2620', + '3000', + '2017', + '0800', + ], + }, { locale: 'CA', valid: [