-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature-request] Add formatPhone #146
Comments
Nice idea @linconkusunoki ! I think these functions fit with our scope and we could have |
Sure! I'll be working on this on the next days 😀 |
I was thinking about the functions, and I don't know what is the best approach, because there are cases where we'll need to have the country code, so it'll be something like formatPhone(number, { countryCode: 55, withParenthesis: true }) what do you guys think? |
Nice thoughts @linconkusunoki . I think we can do the simple (but scalable) just receiving a phone number and formatting for the most common format in Brazil |
I think it's a good idea to have the ability to format phones (landline and mobile)
as we already have the validators (
isValidMobilePhone
andisValidLandlinePhone
),we could also have the formaters (
formatMobilePhone
andformatLandlinePhone
)or
just have
formatPhone
that check if it's mobile or landline and apply the correct maskThe text was updated successfully, but these errors were encountered: