question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello I have a question,

I want to accept some phonenumbers like: 33612902554 (FR country)

If I try the google lib (https://rawgit.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/demo-compiled.html), the result is:

****Formatting Results:**** 
E164 format: +33612902554
Original format: 33 6 12 90 25 54
National format: 06 12 90 25 54
International format: +33 6 12 90 25 54
Out-of-country format from US: 011 33 6 12 90 25 54
Out-of-country format from Switzerland: 00 33 6 12 90 25 54

which is perfect for me, but with libphonenumber-js (https://catamphetamine.github.io/libphonenumber-js/) I have:

Number: +3333612902554
Country: FR
National: 33612902554
International: +33 33612902554
URItel: +3333612902554
Type—
Possible false
Valid false

which is not good for me (+3333 …), I know it’s because I didn’t add the ‘+’ but it’s working with the google lib.

Do you have an explanation to this please ? thanks you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
catamphetaminecommented, Feb 17, 2020

@Hakim-Bou

that’s seems good to me, except for the As you type method

Good point, forgot about the .getNumber() method of AsYouType. Fixed in libphonenumber-js@1.7.42. To keep the code simpler, I didn’t implement formatting of such numbers in AsYouType — it’ll be a form of taxation of users that input incorrect numbers: such numbers would still be parsed, but they won’t be formatted.

1reaction
hbouhadjicommented, Feb 16, 2020

@catamphetamine that’s seems good to me, except for the As you type method (https://catamphetamine.github.io/libphonenumber-js/)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Behavior - unusual or strange
Unusual or strange behavior involves performing actions that are not normal for the person. Alternative Names. Acting strangely ...
Read more >
Unusual Behavior: Symptoms, Signs, Causes & Treatment
Symptoms of ODD may include frequently losing temper, being annoyed by others, arguing with adults, refusing to comply with adult requests, refusing to...
Read more >
What is BIZARRE BEHAVIOR? definition of ...
Psychology Definition of BIZARRE BEHAVIOR: adj. a general term for behavior that is out of the ordinary or far from normal. Markedly unusual...
Read more >
Bizarre/Psychotic Behavior
Extremely odd or eccentric behavior; Inappropriate or complete lack of emotion; Bizarre behavior that could indicate hallucinations; Strange beliefs that ...
Read more >
25 Weird Things Humans Do Every Day, and Why
With a little contemplation, many everyday human behaviors seem truly bizarre.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found