Miss any of our Open RFC calls?Watch the recordings here! »

@preaction/validation

2.0.5 • Public • Published

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.

Keywords

Install

npm i @preaction/validation

DownloadsWeekly Downloads

23

Version

2.0.5

License

MIT

Unpacked Size

32 kB

Total Files

22

Last publish

Collaborators

  • avatar