Skip to content

Commit

Permalink
fix: update isMobilePhone validation for en-SG (#1573)
Browse files Browse the repository at this point in the history
Co-authored-by: Li Liwei <liwei.li@hreasily.com>
  • Loading branch information
liliwei25 and Li Liwei committed Apr 13, 2021
1 parent 63b6162 commit a31c116
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
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
Expand Up @@ -6263,13 +6263,15 @@ describe('Validators', () => {
{
locale: 'en-SG',
valid: [
'32891278',
'87654321',
'98765432',
'+6587654321',
'+6598765432',
'+6565241234',
],
invalid: [
'332891231',
'987654321',
'876543219',
'8765432',
Expand Down

0 comments on commit a31c116

Please sign in to comment.