marmelroy / PhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
MIT License
5.15k stars 818 forks source link

Gambia [GM +220] phone number validation #812

Closed mhmdBarek closed 3 days ago

mhmdBarek commented 1 week ago

Steps to reproduce When we try validate the phone number with
public func isValidPhoneNumber(_ numberString: String, withRegion region: String = defaultRegionCode(), ignoreType: Bool = false) -> Bool
method of the library. It returns true for these phone numbers:
+220 8324432 or any number with 8 prefix. Expected result Library should return false for these inputs, for any number that starts with 8. Environment Library version: 4.0.0

bguidolim commented 1 week ago

New Issue Checklist

mhmdBarek commented 3 days ago

Issue Checklist

  • [x] Updated PhoneNumberKit to the latest version
  • [x] Phone number formatted correctly on JavaScript version
  • [x] I searched for existing GitHub issues
  • [x] I am aware that this library is not responsible of adding/removing/changing phone number formats and any request should be done at libphonenumber repo
bguidolim commented 3 days ago

If you followed the checklist, you already know that the library is behaving correctly.