New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile number validation doesn't completely work #121
Comments
Hi @kuyazee, PhoneNumberKit is using metadata from Google's libPhoneNumber project that powers most mobile phone number validation on the web and on mobile. They consider +6309xxxxxxxxxx as a correct format for PH. See: https://libphonenumber.appspot.com/phonenumberparser?number=%2B630918+899+2866&country=PH |
@marmelroy actually it isn't cause I live in the Philippines and there is no such number that is +6309(10 digits) what you showed i.e. this is +6309(9 digits) which is possible. +6309(10 digits) Not valid |
I had one extra x in my reply. This is the number I tested with: Again, please see: |
@marmelroy: I'm also having issues getting PhoneNumberKit to validate a mobile number from the Philippines. No matter how I enter the number in I either get notANumber or unknownType errors. For example: Libphonenumber sees this as valid, but PHK won't validate it. Even with the simulator set to the Philippines region. |
hi @bargangilo, libPhoneNumber also says that this number is invalid. isValidNumberForRegion is false in the link you attached. |
@marmelroy: Ok, if I add the zero in it also returns isValidNumberForRegion as false. I guess this is a libphonenumber issue then? Because I most definitely have a working number. Is PHK only looking at the isValidNumberForRegion? Is there any way to turn that off and only check isValidNumber and isPossibleNumber? |
In the Swift 2.3 version there's no way to turn it off. In the Swift 3.0 version there is a way to ignore the type validation, which is close to Goolgle's isValidNumber. |
But not the regional validation? |
Also I've submitted an issue to libphonenumber: https://github.com/googlei18n/libphonenumber/issues/1710 |
the type validation is the same thing as the regional validation |
Is there an example number? I have looked it up and not found it. Its there in libphonenumber. Please assist |
The default value for PH mobile numbers look like this
+639xxxxxxxxx
or09xxxxxxxxx
, but the library validates+6309xxxxxxxxx
as a correct number.For ID too it doesn't validate the numbers correctly, it this time it won't accept correct values for the numbers
Here's my code
The text was updated successfully, but these errors were encountered: