-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
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
0should be fully supported without truncation. - The component should properly handle both:
- Domestic:
06 12 34 56 78 - International:
+33 6 12 34 56 78
- Domestic:
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
Thanks for your help!
timblackwell
Metadata
Metadata
Assignees
Labels
No labels