daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.04k stars 130 forks source link

French FR mobile phone numbers beginning with 07 should be valid #260

Closed hack3rvaillant closed 2 years ago

hack3rvaillant commented 2 years ago

They are not parsed correcly

Phonelib.parse("0702030405").full_e164.presence
=> "+330702030405"

leading zero should be removed

They are considered invalid

Phonelib.valid? '0702030405'
=> false

but they exist for years now

hack3rvaillant commented 2 years ago

After exploring the source code I realized that my test fell into a edge case of non exsisting 07 numbers. Sorry for the useless issue