sanniassin / react-input-mask

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

How do I get the value without mask? #208

Open rodrigofbm opened 4 years ago

rodrigofbm commented 4 years ago

I need send the phone value like +5573916232 but always get the masked value.

bonzoSPb commented 4 years ago

need that too

sero323 commented 4 years ago

Need this

hellocaio commented 4 years ago

Try stripping any non-numeric chars from the string. Something like this will do it:

function stripPhonenumber(phonenumber) {
    return phonenumber.replace(/[^0-9]+/g, "");
}
tamimattafi commented 4 years ago

Need this

nfantone commented 4 years ago

Same here. There should be an option to ignore the mask and not let it be part of the input value.

omerman commented 4 years ago

Any news?

WalissonPires commented 2 years ago

https://github.com/sanniassin/react-input-mask/issues/25#issuecomment-1050817718