Skip to content

8sun/validator

Repository files navigation

8sun / validator

A simple and efficient data type validator that provides a user-friendly call chain interface.

Example:

    assert.ok(new Validator(1).isInt().inRange(1, 2).check())
    assert.ok(new Validator(null).isString().notEmpty().nullable().check())

Supported types:

  • integer
  • decimal
  • date (dataString, dateTimeString)
  • object
  • string
  • array

About

JS type and constraint validator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published