1.0.11 • Published 6 years ago

react-native-masked-input-text v1.0.11

Weekly downloads
49
License
MIT
Repository
github
Last release
6 years ago

Masked InputText for React Native

Build Status Coverage Status npm version

Install

NPM

npm install react-native-masked-input-text 

Yarn

yarn add react-native-masked-input-text

Usage

import MaskedInput from 'react-native-masked-input-text'

render() {
    return (
        <View>
            <MaskedInput mask={'xXas\\00?'} placeholder={'xXas00'} />
        </View>
    )
}

Mask options

This library supports the following options as its mask definition:

  • x: a lower case letter
  • X: a upper case letter
  • s: either a lower or upper case letter
  • a: an alpha numeric char (either lower or upper case)
  • 0: any digit
  • ?: makes the previous symbol optional
  • \: Escapes the next symbol and makes it as a static part of the mask

Note: Any char not declared above are considered static.

Examples

DescriptionMaskValid input
US Phone number+1-000-000-0000+1-541-754-3010
Date00/00/000025/12/2019
Hour00:0023:15
Brazil Cellphones+55 (00) 9 0000-0000+55 (65) 9 8765-4321
IP Address00?0?.00?0?.00?0?.00?0?127.0.0.1
CPF000.000.000-00123.456.789-01
Mask with lettersXX-0000/1000AB-1234/1987
1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago