react-input-mask icon indicating copy to clipboard operation
react-input-mask copied to clipboard

How do I get the value without mask?

Open rodrigofbm opened this issue 5 years ago • 7 comments

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

rodrigofbm avatar Feb 27 '20 01:02 rodrigofbm

need that too

bonzoSPb avatar Apr 05 '20 10:04 bonzoSPb

Need this

sero323 avatar Apr 14 '20 17:04 sero323

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

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

hellocaio avatar Apr 23 '20 01:04 hellocaio

Need this

tamimattafi avatar Jul 02 '20 07:07 tamimattafi

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

nfantone avatar Jul 31 '20 16:07 nfantone

Any news?

omerman avatar Sep 07 '20 16:09 omerman

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

WalissonPires avatar Feb 25 '22 13:02 WalissonPires