react-native-masked-text
react-native-masked-text copied to clipboard
rawText equal to text when type=custom
Hello,
After logging the text and rawText of a custom type masked input, I noticed that the raw text is equal to the text.
You need to provide your own raw value resolver when using custom type:
<TextInputMask
type='custom'
options={{
mask: '(999) 999-9999',
getRawValue: value => value.replace(/[()\s-]/g, '')
}}
/>