@caricati/nvalid
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Caricati.io - Design System

npm tests and build MIT


nvalid

A lightweight validation library written in JavaScript.

Install

Install nvalid dependency using node package manager:

npm i @caricati/nvalid

Using

Use only a fragment from the library:

import { isEmail } from '@caricati/nvalid'

isEmail('invalid email@here') // false
isEmail('name@email.com') // true

Use a collection of validations:

import validate from '@caricati/nvalid'

validate('user@email.com').email().required() // passed
validate('Mr. Caricati').string().required() // passed

validate('my ip').ip() // handle exception
validate('').required() // handle exception

Readme

Keywords

none

Package Sidebar

Install

npm i @caricati/nvalid

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

30.2 kB

Total Files

45

Last publish

Collaborators

  • mrcaricati