2.0.6 • Published 4 years ago

@preaction/validation v2.0.6

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

Preaction Validation

This is a small validation library for JavaScript using a simple signature for its functions.

Validator Function Signature

A validator function takes a single value argument and return a string. Validity is determined by the returned string's length.

Install

yarn

yarn add @preaction/validation

npm

npm install --save @preaction/validation

jsdelivr CDN

<script src="https://cdn.jsdelivr.net/npm/@preaction/validation@latest/dist/preaction-validation.umd.min.js"></script>

Remember to replace latest with the version number in production.

Importing Functions

ES Module

import { notEmptyValidator } from '@preaction/validation'

CommonJS Module

const { notEmptyValidator } = require('@preaction/validation')

IIFE

const { notEmptyValidator } = window['@preaction/validation']

API

See API.md.

2.0.6

4 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

1.3.10

5 years ago

2.0.0

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago