You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While testing the lib for Indian mobile numbers, passing incorrect mobile number without options, matches with Bangladesh regex and returns true.
Examples
mobile = "+91895713829";
isMobilePhone(mobile); // returns true
Hey @ankitAtVauld, i tried reproducing the bug with the example you have provided. It seems that you are providing just the mobile phone number, please try adding the locale parameter, i.e., 'en-IN' for India, to the isMobilePhone function
@akkaraju-satvik Actually using isMobilePhone without a locale is a correct behaviour and will test the phone number with all available locales.
The faulty regex has been changed in #1032 and added to [email protected], @ankitduseja please update to a more recent version of the package to fix your issue.
@akkaraju-satvik Actually using isMobilePhone without a locale is a correct behaviour and will test the phone number with all available locales. The faulty regex has been changed in #1032 and added to [email protected], @ankitduseja please update to a more recent version of the package to fix your issue.
Describe the bug
While testing the lib for Indian mobile numbers, passing incorrect mobile number without options, matches with Bangladesh regex and returns true.
Examples
mobile = "+91895713829";
isMobilePhone(mobile); // returns true
Additional context
Validator.js version: "^10.11.0"
Node.js version: 14
OS platform: macOS
The text was updated successfully, but these errors were encountered: