Closed gign0766 closed 4 years ago
I'm on Angular 8, with the following dependencies for the package :
"google-libphonenumber": "^3.2.2", "hammerjs": "^2.0.8", "intl-tel-input": "^15.1.2", "ngx-intl-tel-input": "^2.3.1",
+1
Are you sure this is not google-libphonenumber
specific issue?
no it's not google-libphonenumber because I don't use it I use only your component.
@larabirabert it's impossible because google-libphonenumber
is the dependency for this library. We are just the wrapper for angular.
You can see here: https://libphonenumber.appspot.com/phonenumberparser?number=701020304&country=FR
This is what google-libphonenumber
returns:
Validation Results
Result from isPossibleNumber() true
Result from isValidNumber() false
Phone Number region FR
Result from getNumberType() UNKNOWN
Closing this as this is definitely google-libphonenumber
related.
Ok I understand, we make a workaround in our application but can you do a work around in your component ?
@larabirabert what do you mean by workaround? As I understand the number +33 7 01 02 03 04
is not valid. It is just isPossibleNumber
, which means:
quickly guessing whether a number is a possible phonenumber by using only the length information, much faster than a full validation.
Are you suggesting adding optional parameter which would override "full" validation, in favor of only length check?
like: [validationType]=ValidationType.Full
or [validationType]=ValidationType.Length
If so, then please create a new issue as a feature request.
this number is valid in France it’s new since 2010
Before 2010 it’s was not valid it’s started only with 06 and 8 numbers Since 2010 it’s 06 or 07 and 8 numbers
Ok, this is interesting.
I tried this other more up to date library which was proposed to be used instead of current google-libphonenumber
.
Here is a demo I found. It looks like this lib properly validates these new French numbers. Can you confirm that? Maybe then we can try to replace this library with the aforementioned.
I have tested it on your demo link it works fine for + 33 6 and 8 numbers and + 33 7 and 8 numbers
Strange, because, the original demo page: https://catamphetamine.gitlab.io/libphonenumber-js/ has the same valid: False result...
I'm kind of lost on this one to be honest, everywhere I try to validate this number +33701020304 it comes up as false. Do you have any examples online where this numbers validates as correct?
Your right I am wrong +33 7 50 02 03 04 is valid +33 7 01 02 03 04 is not valid as I can read in wikipedia : https://fr.wikipedia.org/wiki/Liste_des_pr%C3%A9fixes_des_op%C3%A9rateurs_de_t%C3%A9l%C3%A9phonie_mobile_en_France It should start with 075 or 076 or 078 or 079 but not 070
So it's not a bug
Ok, then I'm closing this.
Hi, I found an issue on French phone numbers. When I try to enter a number like +33 7 xx xx xx xx, the form is invalid, but this is a valid french mobile number.