Custom mask for all country #65
Answered
by
goveo
jovanhartono
asked this question in
Q&A
-
It is possible to add custom masks for all countries? nice project btw |
Beta Was this translation helpful? Give feedback.
Answered by
goveo
Jul 29, 2023
Replies: 1 comment
-
@jovanhartono Thanks! const countries = defaultCountries.map((country) => {
const parsedCountry = parseCountry(country);
return buildCountryData({
...parsedCountry,
format: '...-....-....',
});
});
export const App = () => {
return <PhoneInput countries={countries} defaultCountry="ua" />;
}; But this example doesn't handle dial-code value, so this will be supported:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jovanhartono
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jovanhartono Thanks!
You can pass the country param with modified
format
country values:But this example doesn't handle dial-code value, so this will be supported: