1.6.0 • Published 6 years ago

anchor-validation v1.6.0

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

Anchor validation

Build Status

Module for exposing a few validation methods to be used in redux-forms.

Usage

Install from npm

NPM

Examples

redux-form

import { maxLength, minLength, required, isAlphanumeric } from 'anchor-validation';

<form>
  <Field
    name="username"
    component={renderField}
    label="username"
    type="text"
    validate={
      [
        value => required(value, 'required'),
        value => minLength(2)(value, 'error_min_length'),
        value => maxLength(15)(value, 'error_max_length'),
        value => isAlphanumeric(value, 'error_not_alphanumeric')
      ]
    }
  />
  <Button onClick={handleSubmit(onSubmit)} disabled={invalid || submitting}>
    <p>Sign in</p>
  </Button>
</form>
1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago