Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jurassix/react-validation-mixin
Simple validation mixin (HoC) for React.
https://github.com/jurassix/react-validation-mixin
Last synced: about 2 months ago
JSON representation
Simple validation mixin (HoC) for React.
- Host: GitHub
- URL: https://github.com/jurassix/react-validation-mixin
- Owner: jurassix
- License: mit
- Archived: true
- Created: 2015-01-09T15:14:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T19:28:19.000Z (about 6 years ago)
- Last Synced: 2024-10-12T02:14:37.975Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.84 MB
- Stars: 283
- Watchers: 7
- Forks: 38
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-components-all - react-validation-mixin - Simple validation mixin (HoC) for React. (Uncategorized / Uncategorized)
- awesome-react-components - react-validation-mixin - Simple validation mixin (HoC) for React. (Code Design / Form Logic)
- awesome-react - react-validation-mixin - Simple validation mixin (HoC) for React. ![](https://img.shields.io/github/stars/jurassix/react-validation-mixin.svg?style=social&label=Star) (UI Components / Form Components)
- awesome-list - react-validation-mixin - Simple validation mixin (HoC) for React. (Code Design / Form Logic)
- awesome-react-components - react-validation-mixin - Simple validation mixin (HoC) for React. (Code Design / Form Logic)
- awesome-react-components - react-validation-mixin - Simple validation mixin (HoC) for React. (Code Design / Form Logic)
README
# react-validation-mixin
_Simple validation library for React._This library simply wraps your React Component, transferring it props containing the boilerplate to validate a React form.
**react-validation-mixin** aims to provide a low-level toolkit for _React.Component_ validation, relying on existing validation libraries.
This library currently supports at least two strategies and the community is urged to expand the available strategies. Each strategy is responsible for the data validation and error message responses. A complete list of strategies can be found at [the end of this page](#strategies).
Users of the library are required to install and include the mixin and a chosen strategy.
---
### [View the Demo](http://jurassix.github.io/react-validation-mixin/)
### [Read the Documentation](http://jurassix.gitbooks.io/docs-react-validation-mixin/content/overview/index.html)
### [Steps for migrating from 4.x](http://jurassix.gitbooks.io/docs-react-validation-mixin/content/overview/migration-to-5.html)
---
### Install
Install **mixin** via npm OR yarn:
```javascript
> npm install --save react-validation-mixin
```
```javascript
> yarn add react-validation-mixin
```
Install **validation strategy** via npm OR yarn:```javascript
> npm install --save joi-validation-strategy
```
```javascript
> yarn add joi-validation-strategy
```
Make sure you install the peer dependency [Joi](https://github.com/hapijs/joi) if using the _joi-validation-strategy_:```javascript
> npm install --save joi
```
```javascript
> yarn add joi
```
### StrategiesCurrent list of validation strategy implementations to choose from:
* [joi-validation-strategy](https://github.com/jurassix/joi-validation-strategy) - based on [Joi](https://github.com/hapijs/joi)
* [json-schema-validation-strategy](https://github.com/jefersondaniel/json-schema-validation-strategy) - based on [jsen]
(https://github.com/bugventure/jsen)
* [react-validatorjs-strategy](https://github.com/TheChech/react-validatorjs-strategy) - based on [validatorjs](https://github.com/skaterdav85/validatorjs)---
### _Please contribute suggestions, features, issues, and pull requests._