schemas.js 561 B

1234567891011121314151617181920
  1. 'use strict';
  2. const Joi = require('./index');
  3. const internals = {};
  4. exports.options = Joi.object({
  5. abortEarly: Joi.boolean(),
  6. convert: Joi.boolean(),
  7. allowUnknown: Joi.boolean(),
  8. skipFunctions: Joi.boolean(),
  9. stripUnknown: [Joi.boolean(), Joi.object({ arrays: Joi.boolean(), objects: Joi.boolean() }).or('arrays', 'objects')],
  10. language: Joi.object(),
  11. presence: Joi.string().only('required', 'optional', 'forbidden', 'ignore'),
  12. context: Joi.object(),
  13. noDefaults: Joi.boolean(),
  14. escapeHtml: Joi.boolean()
  15. }).strict();