Skip to content

Commit

Permalink
Update isMobilePhone.js
Browse files Browse the repository at this point in the history
This updated pattern allows for any digit after '9' and ensures that the phone number starts with '09' and is followed by 9 digits. With this change, the regex pattern will correctly match Iranian mobile phone numbers in the "09xx xxx xxxx" format.
  • Loading branch information
saikiran76 authored Oct 19, 2023
1 parent b958bd7 commit aecaa88
Showing 1 changed file with 1 addition 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 @@ -92,7 +92,7 @@ const phones = {
'es-UY': /^(\+598|0)9[1-9][\d]{6}$/,
'es-VE': /^(\+?58)?(2|4)\d{9}$/,
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
'fa-IR': /^(\+?98|0)?9\d{9}$/,
'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,
'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
Expand Down

0 comments on commit aecaa88

Please sign in to comment.