Skip to content

Commit 0a39bb7

Browse files
CrocsxWikiRik
andauthored
feat(isPostalCode): improve TW locale (#2529)
Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
1 parent b72aabc commit 0a39bb7

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
@@ -71,7 +71,7 @@ const patterns = {
7171
SK: /^\d{3}\s?\d{2}$/,
7272
TH: fiveDigit,
7373
TN: fourDigit,
74-
TW: /^\d{3}(\d{2})?$/,
74+
TW: /^\d{3}(\d{2,3})?$/,
7575
UA: fiveDigit,
7676
US: /^\d{5}(-\d{4})?$/,
7777
ZA: fourDigit,

test/validators.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12576,6 +12576,7 @@ describe('Validators', () => {
1257612576
'399',
1257712577
'935',
1257812578
'38842',
12579+
'546023',
1257912580
],
1258012581
},
1258112582
{

0 commit comments

Comments
 (0)