0.1.1 • Published 6 years ago
joi-array-extension v0.1.1
joi-array-extension
Joi extensions for extra string rules.
Lead Maintainer: Kyle Laverty
Overview
This extention is focused on adding the ability to split strings into arrays so that they can be used with the rest of the joi ecosystem as if they were arrays.
Usage
Usage is a two steps process. First, a schema is constructed using the provided types and constraints:
const BaseJoi = require('joi');
const Extension = require('joi-array-extension');
const Joi = BaseJoi.extend(Extension);
const schema = Joi.array().separator(',').items(...);
API
See the API Reference.