MaskedMultilineTextInput
Component | Source Code
extends Omit<MultilineTextInputProps, “onChangeText”>
Props Inheritance Hierarchy: Omit<MultilineTextInputProps, “onChangeText”>
Receives user input in the form of text. Allows masking the input to limit accepted characters.
You can choose whether you control this component, but if you don’t control it, the component will control the underlying input for you. This allows a provided mask to still apply to the user input.
Properties
Section titled “Properties”mask?: RegExp
Section titled “mask?: RegExp”Mask to apply to the input. The masking is applied using maskText. Because this component is intended to allow multiline text, your regex does not need to explicitly allow newlines.
Example
Section titled “Example”const onlyNumbersMask = /\d/;onChangeText?: Function
Section titled “onChangeText?: Function”Handler for when the user attempts to change the input.