Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 580 Bytes

API.md

File metadata and controls

28 lines (19 loc) · 580 Bytes

API Reference

Rules

array.separator(separator, limit?)

Used to seperate a string into an array:

  • separator - string to seperate based on.
  • limit - [Optional] - number to limit the length of the returned array.
const schema = Joi.array().separator(',').items(...);

or if you want to limit the split results:

const schema = Joi.array().separator(',', 2).items(...);