sanniassin / react-input-mask

Input masking component for React. Made with attention to UX.
MIT License
2.22k stars 257 forks source link

Thanks, it worked for me. #258

Open edsonjuniornarvaes opened 3 years ago

edsonjuniornarvaes commented 3 years ago

I made this implementation to handle Brazilian phone numbers. But it is necessary to use this function in a normal "input" instead of "InputMask". This function must be passed in the "onKeyPress" of the input. It worked fine for me, and also works with copy and paste commands.

Originally posted by @EriJohnson in https://github.com/sanniassin/react-input-mask/issues/190#issuecomment-817376306