Browse Source

Added FAQ on why country-calling-code is not always parsed (#1377)

from the start of a phone number.

Relevant for the many issues lately complaining about this behaviour for German numbers (country code 49) e.g. #1335 and #1067, etc
pull/1378/head
lararennie 9 years ago
committed by GitHub
parent
commit
a6d1cdbeeb
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      FAQ.md

+ 17
- 0
FAQ.md View File

@ -1,5 +1,22 @@
# Frequently Asked Questions (FAQ)
## Parsing
### Why wasn't the country code removed when parsing?
In some cases, the library cannot tell if the leading digits of a phone number
are intended to be the country calling code, or the start of the national
significant number.
This affects primarily German phone numbers, where 49 is both a country calling
code and an area code, and numbers of variable lengths are valid. The leading
digits will only be interpreted as a country calling code if the number is not
already considered a possible number for the region provided when parsing.
If you know that your numbers are always in the form <country calling
code><national significant number>, it is safe to put a "+" in front to
indicate this to the library.
## Validation and types of numbers
### What is the difference between isPossibleNumber and isValidNumber?


Loading…
Cancel
Save