@cuser/validator
TypeScript icon, indicating that this package has built-in type declarations

0.0.36 • Public • Published

cuser logo

Status

codecov npm npm-downloads

@cuser/validator

Index

Classes

Functions

Functions

createValidator

ConstcreateValidator(schema: any): validate

Defined in validator.js:34

Creates a validator which raise a ValidationError when the object doesn't fit the schema

Parameters:

Name Type Description
schema any

Returns: validate

Class: ValidationError

Validator error class with nested errors

Hierarchy

  • Error

    ValidationError

Index

Constructors

Constructors

constructor

+ new ValidationError(message: any, validator: ValidateFunction, value: any): ValidationError

Defined in validator.js:15

Parameters:

Name Type
message any
validator ValidateFunction
value any

Returns: ValidationError

Readme

Keywords

none

Package Sidebar

Install

npm i @cuser/validator

Weekly Downloads

4

Version

0.0.36

License

MIT

Unpacked Size

6.44 kB

Total Files

5

Last publish

Collaborators

  • rubeniskov