@palmabit/joi-max-words
v0.0.4
Published
Joi extension for max words
Downloads
1
Readme
DEPRECATED
This is no longer supported, please use https://github.com/Palmabit-IT/joi-words-extension instead.
Install
npm install @palmabit/joi-max-words
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('@palmabit/joi-max-words');
const Joi = BaseJoi.extend(Extension);
const schema = Joi.string().maxWords(500);