Simple Form Validation With Constraints

Category: Form , React , React Native | February 9, 2018
Author: tkrotoff
Views Total: 111
Official Page: Go to website
Last Update: February 9, 2018
License: MIT

A simple, lightweight, form validation component for both React and React Native.

Features:

  • Minimal API and footprint
  • Control HTML5 error messages: <FieldFeedback when="valueMissing">My custom error message</FieldFeedback>
  • Custom constraints: <FieldFeedback when={value => ...}>
  • Warnings and infos: <FieldFeedback ... warning><FieldFeedback ... info>
  • No dependency beside React (no Redux, MobX…)
  • No special component like <TextField>, just plain old <input> or whatever you like
  • Re-render only what’s necessary

Installation:

# NPM
$ npm install react-form-with-constraints --save

# NPM
$ npm install react-form-with-constraints-native --save

Preview:

react-form-with-constraints