Pranav Kedia
Pranav Kedia
There are 2 things going on here. 491 is a valid area code inside Germany. Also 49 is country code for Germany. The gem gets confused when it is given...
There is a bug. e.g. ``` irb(main):070:0> TelephoneNumber.parse('+491788').valid? => true ``` `+491788` is clearly an invalid number, but this gem treats it as valid.
As suggested in https://github.com/mobi/telephone_number/issues/99, we are using https://github.com/daddyz/phonelib for validation. It works on the same Google metadata. We `&&` the result of both this gem and phonelib gem.