FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

JamShady/validator: Utility library for defining and executing form validation rules · GitHub

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validator

A light-weight validator, that applies a rule-set against a value, and returns the failures.

The rules are processed in the order of the example:

import validate from '@shady/validator'

// returns [] if there are no failing rules
const errors = validate(value, {
    required: boolean,
    min: number,
    max: number,
    gte: number,
    lte: number,
    pattern: RegExp | string,
    match: any,
    differ: any,
    differs: any[],
    email: boolean,
    onOrAfter: Date | string | number,
    onOrBefore: Date | string | number,
})

About

Utility library for defining and executing form validation rules

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL