Skip to content
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

Phone Format support? #7

Open
YanDevDe opened this issue Dec 23, 2023 · 2 comments
Open

Phone Format support? #7

YanDevDe opened this issue Dec 23, 2023 · 2 comments

Comments

@YanDevDe
Copy link

At cleave.js we had the possibility to format the telephone number. But it seems like I do not see this option at cleave-zen. Is this planned?

@maykon-oliveira
Copy link

How about:

const value = formatGeneral(e.currentTarget.value, {
    blocks: [0, 2, 5, 4],
    delimiters: ['(', ') ', '-'],
    delimiterLazyShow: true,
    numericOnly: true
});

@YanDevDe
Copy link
Author

YanDevDe commented May 30, 2024

@maykon-oliveira While enough for my case - it won't work well for international, because depending on country, phone number format might differ.

(Thank you for the help tho!!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants