# redux-form-create-validator

> A helper utility that allows you to create redux form validations.

Latest version **0.1.3** (published 2016-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-form-create-validator
pnpm add redux-form-create-validator
yarn add redux-form-create-validator
bun add redux-form-create-validator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-12-19 |
| First published | 2016-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ryan C. Collins |
| Maintainers | ryancollins-io |
| Keywords | Redux, store, mocking, testing, utilities |

## Links

- npm: https://www.npmjs.com/package/redux-form-create-validator
- Repository: https://github.com/RyanCCollins/redux-mock-provider
- Homepage: https://github.com/RyanCCollins/redux-mock-provider#readme
- Issues: https://github.com/RyanCCollins/redux-mock-provider/issues
- npm.io page: https://npm.io/package/redux-form-create-validator

## Dependencies (9)

- [eslint](https://npm.io/package/eslint.md) ^3.10.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.5.4
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.0.1
- [babel-core](https://npm.io/package/babel-core.md) ^6.0.20
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^7.1.0
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.0.15
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.0.15
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^13.0.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.2.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2016-12-19
- 0.1.2 — 2016-12-19
- 0.1.1 — 2016-12-19

## README

# Redux form create validator

A utility that allows you to create a validator for use with Redux Form (v.5.2.5)

# Example Usage
```
import createValidator, * as validation from 'redux-form-create-validator';
import memoize from 'lru-memoize';

// Compose validation functions for all input fields
const passwordInput = [
  validation.containsLowercase,
  validation.containsUppercase,
  validation.minLength(8),
  validation.maxLength(20),
  validation.containsNumber,
  validation.valueRequired,
  validation.containsSpecialChar,
];

const nameInput = [
  validation.containsTwoWords,
  validation.valueRequired,
  validation.maxLength(50),
];

const emailInput = [
  validation.isEmail,
  validation.valueRequired,
  validation.maxLength(50),
  validation.minLength(2),
];

const passwordConfirmationInput = [
  validation.valueRequired,
];

// Create the validator
const signupValidation = createValidator({
  passwordInput,
  nameInput,
  emailInput,
  passwordConfirmationInput,
});

/* Memoize and export */
const validator = memoize(10)(signupValidation);
export default validator;

```

---
_Source: https://npm.io/package/redux-form-create-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
