Skip to content

Commit

Permalink
fix: ensure sweedish postal code does not allow start with 0
Browse files Browse the repository at this point in the history
- Authored by Ezrqn Kemboi <ezrqnkemboi@gmail.com>
- Close validatorjs#1008
  • Loading branch information
ezkemboi committed Jul 24, 2019
1 parent 02896f3 commit 6cc1845
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/isPostalCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var patterns = {
RO: sixDigit,
RU: sixDigit,
SA: fiveDigit,
SE: /^\d{3}\s?\d{2}$/,
SE: /^[1-9]\d{2}\s?\d{2}$/,
SI: fourDigit,
SK: /^\d{3}\s?\d{2}$/,
TN: fourDigit,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/isPostalCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const patterns = {
RO: sixDigit,
RU: sixDigit,
SA: fiveDigit,
SE: /^\d{3}\s?\d{2}$/,
SE: /^[1-9]\d{2}\s?\d{2}$/,
SI: fourDigit,
SK: /^\d{3}\s?\d{2}$/,
TN: fourDigit,
Expand Down
2 changes: 1 addition & 1 deletion validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ var patterns = {
RO: sixDigit,
RU: sixDigit,
SA: fiveDigit,
SE: /^\d{3}\s?\d{2}$/,
SE: /^[1-9]\d{2}\s?\d{2}$/,
SI: fourDigit,
SK: /^\d{3}\s?\d{2}$/,
TN: fourDigit,
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit 6cc1845

Please sign in to comment.