Skip to content

French domestic numbers with leading 0 get truncated #255

@marcelopbg

Description

@marcelopbg

French numbers with leading 0 get truncated when using react-international-phone

Hi,

I’ve run into an issue when using French phone numbers with the react-international-phone component.

Problem

  • In France, domestic numbers always start with a leading 0 (trunk prefix).
    Example: 06 12 34 56 78.
  • The component enforces the international format, where the same number is written as +33 6 12 34 56 78.
  • The issue: when users enter the domestic format (0X…), the component assumes the same length as the international format and cuts off the last digit.
  • As a result, many of my French users have ended up saving an incorrect number.

Expected behavior

  • French numbers entered with a leading 0 should be fully supported without truncation.
  • The component should properly handle both:
    • Domestic: 06 12 34 56 78
    • International: +33 6 12 34 56 78

Possible solutions

  • Allow one extra character in the French mask to account for the leading 0.
  • Or treat the leading zero as an exception in the parsing logic.

Workarounds?

Is there anything I can configure on my side to handle this (e.g., custom mask, custom parsing)?

Screenshot

Image

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions