Skip to content

Commit da31998

Browse files
committed
feat(isPostalCode): Allow taiwan 3+3 format
1 parent a7d5cff commit da31998

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib/isPostalCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const patterns = {
6969
SK: /^\d{3}\s?\d{2}$/,
7070
TH: fiveDigit,
7171
TN: fourDigit,
72-
TW: /^\d{3}(\d{2})?$/,
72+
TW: /^\d{3}(\d{2,3})?$/,
7373
UA: fiveDigit,
7474
US: /^\d{5}(-\d{4})?$/,
7575
ZA: fourDigit,

test/validators.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12753,6 +12753,7 @@ describe('Validators', () => {
1275312753
'399',
1275412754
'935',
1275512755
'38842',
12756+
'546023',
1275612757
],
1275712758
},
1275812759
{

0 commit comments

Comments
 (0)