Skip to content

Commit a31c116

Browse files
liliwei25Li Liwei
and
Li Liwei
authored
fix: update isMobilePhone validation for en-SG (#1573)
Co-authored-by: Li Liwei <[email protected]>
1 parent 63b6162 commit a31c116

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const phones = {
4646
'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,
4747
'en-PH': /^(09|\+639)\d{9}$/,
4848
'en-RW': /^(\+?250|0)?[7]\d{8}$/,
49-
'en-SG': /^(\+65)?[689]\d{7}$/,
49+
'en-SG': /^(\+65)?[3689]\d{7}$/,
5050
'en-SL': /^(?:0|94|\+94)?(7(0|1|2|5|6|7|8)( |-)?\d)\d{6}$/,
5151
'en-TZ': /^(\+?255|0)?[67]\d{8}$/,
5252
'en-UG': /^(\+?256|0)?[7]\d{8}$/,

test/validators.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6263,13 +6263,15 @@ describe('Validators', () => {
62636263
{
62646264
locale: 'en-SG',
62656265
valid: [
6266+
'32891278',
62666267
'87654321',
62676268
'98765432',
62686269
'+6587654321',
62696270
'+6598765432',
62706271
'+6565241234',
62716272
],
62726273
invalid: [
6274+
'332891231',
62736275
'987654321',
62746276
'876543219',
62756277
'8765432',

0 commit comments

Comments
 (0)