mui-tel-input
mui-tel-input copied to clipboard
libphonenumber-js provides an option to get phone number type, could you add it as an export please?
Hi, firstly, this is fantastic, the best one I've found so far for material-UI, great work. 👏
I could really do with being able to import some of the other options from libphonenumber-js. I could just import the library myself into my codebase but seeing as you already provide an option to import the check for isValidNumber function I wondered if you thought it would make sense to also include the phone number type check?
For context, this is useful for me to know when to send a text message and when not i.e. landline vs mobile.
P.S. Side note: I noticed that the documentation for the integration with react-hook-form is referring to version 7 of react-hook-form but I use version 6, this took me a little while to figure out why it wouldn't work for me. Might be nice to specify this in case others run into the same problem 😊 other than that, great work!
EDIT: Thinking about it, it would make sense if the NumberType was passed back as part of the MuiTelInputInfo from the onChange event
I added PR with this change 😊 - https://github.com/viclafouch/mui-tel-input/pull/33
Waiting for a little fix and I merge it ;)
Remove package-lock and pushed :)