Skip to content

Commit

Permalink
fix: update isMobilePhone validation for en-SG
Browse files Browse the repository at this point in the history
  • Loading branch information
Li Liwei committed Jan 6, 2021
1 parent 8831db3 commit 63e3060
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const phones = {
'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,
'en-PH': /^(09|\+639)\d{9}$/,
'en-RW': /^(\+?250|0)?[7]\d{8}$/,
'en-SG': /^(\+65)?[689]\d{7}$/,
'en-SG': /^(\+65)?[3689]\d{7}$/,
'en-SL': /^(?:0|94|\+94)?(7(0|1|2|5|6|7|8)( |-)?\d)\d{6}$/,
'en-TZ': /^(\+?255|0)?[67]\d{8}$/,
'en-UG': /^(\+?256|0)?[7]\d{8}$/,
Expand Down
2 changes: 2 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6161,13 +6161,15 @@ describe('Validators', () => {
{
locale: 'en-SG',
valid: [
'32891278',
'87654321',
'98765432',
'+6587654321',
'+6598765432',
'+6565241234',
],
invalid: [
'332891231',
'987654321',
'876543219',
'8765432',
Expand Down

0 comments on commit 63e3060

Please sign in to comment.