jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers
https://intl-tel-input.com
MIT License
7.38k stars 1.93k forks source link

Invalid country data for French overseas territories #1604

Closed DynamoRed closed 2 months ago

DynamoRed commented 2 months ago

Steps to reproduce

  1. Have an IP from an overseas territory (such as Guadeloupe, Martinique, etc.) in France
  2. Load a page with intl-tel-input and IPAPI configured as geoIpLookup callback

Expected behaviour

The phone number should have a French format and a French flag should appear

Actual behaviour

The error "No country data for 'gp'" appears and no flag or format is correctly selected by default

Initialisation options

jackocnr commented 2 months ago

Can you log the value of data.country_code that is being passed to the callback?

Because when I test it, passing "gp", it seems to work fine: https://codepen.io/jackocnr/pen/mdYdbPa

Some more questions:

jackocnr commented 2 months ago

Closing due to inactivity.