You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gabypancu that happens due to country calling code (49) being also a valid area code, and numbers have variable lengths. When you are using + it instructs the gem that you provided the full e164 number. When + is omitted gem will try to add the country code after guessing the country (Phonelib.parse("491127690778", :de).e164 # => "+49491127690778" ).
The number starting with "1" is also parsed as invalid in original libphonenumber. You can check it here and open an issue for them. Gem's data is based on it.
German phone numbers that start with a "1" (after the "49" country code) are wrongly considered invalid if there is a "+" at the start of the number.
The two are parsed differently, with a notable difference in the
national
number - one includes the country code49
and one doesn't.When the country code is omitted, we also consider a number starting with "1" to be invalid:
The regex likely needs to be updated, as mobile phone numbers in Germany start with "1"
The text was updated successfully, but these errors were encountered: