1.0.2 • Published 8 years ago

rc-mask-input v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

rc-mask-input


React MaskInput Component Just for format mobile numbers, bankcard numbers, credit card numbers... Auto blank for those numbers, special for mobile devices, fix bugs when using different language input methods

NPM version build status Test coverage gemnasium deps npm download

Screenshots

Development

npm install
npm start

Example

http://localhost:8021/examples/

online example: http://zealot09.github.io/rc-masked-input/

install

rc-mask-input

Usage

default is mobile format, split the mobile number like 15984382312 as [3, 4, 4] auto format to 159 8438 2312

just define group attribute

var MaskInput = require('rc-mask-input');
var React = require('react');
React.render(<MaskInput />, container);

bankcards? 622202xxxxxxxx format as the given group

var MaskInput = require('rc-mask-input');
var React = require('react');
React.render(<MaskInput group={[4, 4, 4, 4, 3]} />, container);

API

props

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-mask-input is released under the MIT license.