1.2.2 • Published 6 years ago

react-native-input-validation v1.2.2

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

Installation

Using npm: npm i -S react-native-input-validation Using yarn: yarn add react-native-input-validation


Quick Start

First import InputValidation from 'react-native-input-validation

Then simply use it in your component like this:

<InputValidation validator="email" onValidatorExecuted={isValid => console.log(isValid)} validatorExecutionDelay={100}/>

This will display a text input. When you type, the "email" validator (already defined in the component) will be tested with the input value after 100ms, then it will trigger the onValidatorExecuted callback, passing the validity of the input.


Run the example

  • cd example
  • npm install or yarn
  • react-native run-ios or react-native run-android

Props and methods

The input accepts every props from TextInput component.

Props

Methods


Contributing

If you have any problem, leave an issue here

If you want to add a feature of fix a bug, leave a pull request.