9 digit French phone number input is causing issues for my users, and the `enableLongNumbers` prop does not allow setting to 10
pmnord opened this issue · comments
Peter commented
react-phone-input-2/src/index.js
Line 536 in 39f787c
// Does exceed default 15 digit phone number limit
if (value.replace(/\D/g, '').length > 15) {
if (this.props.enableLongNumbers === false) return;
if (typeof this.props.enableLongNumbers === 'number') {
if (value.replace(/\D/g, '').length > this.props.enableLongNumbers) return;
}
}
I'm trying to set the input limit to 10 in the case of French users, who are expecting the following format XX XX XX XX XX
but currently react-phone-input-2 uses X XX XX XX XX
which is not what my French users expect and is causing user errors when inputting.
Is it possible to either change the formatting of French phone number inputs to XX XX XX XX XX
, or else allow enableLongNumbers
to be set at 10?