Skip to content
This repository has been archived by the owner on Feb 24, 2019. It is now read-only.

vlad-zhukov/joi-manager

Repository files navigation

joi-manager · npm

Manage Joi schemas with joy.

API

new JoiManager([defaultOptions])

Arguments

  • [defaultOptions] (Object): Optional. Options that will be passed to Joi.validate.

Returns

JoiManager instance.


JoiManager

Methods

  • add(schemaName, schema)this: Adds a new schema to the list.
  • get(schemaName)schema: Retrieves a schema from the list by its name.
  • validate(schemaName, value, [options])*: Validates a value according to schema that was added with the add method. options are merged with defaultOptions.