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 Validator #632

Open
aress31 opened this issue Sep 16, 2021 · 2 comments
Open

Phone Validator #632

aress31 opened this issue Sep 16, 2021 · 2 comments

Comments

@aress31
Copy link

aress31 commented Sep 16, 2021

Just found out about this lib since I am trying to reduce my app bundle size. One nice feature would be to implement a light weight version of Yup Phone (https://www.npmjs.com/package/yup-phone) once done this lib will meet all my needs!

@bvego
Copy link
Collaborator

bvego commented Sep 16, 2021

hi there, I'll see what I can do

I'll attempt to add a phone validator that can monkey-patch the library, so its fully optional and not included in the bundle by default (phone validator libs can't really be that small...)

In the meantime, you can try using https://www.npmjs.com/package/libphonenumber-js together with Nope.string().test()

@aress31
Copy link
Author

aress31 commented Sep 16, 2021

Thanks @bvego tha would be awesome if you could come up with a super light weight version of this validator, the problem with libphonenumber-js is that it expect a country code and I do not want to restrict my validation to a specific country.

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