npm.io
0.0.4 • Published 7 years ago

@palmabit/joi-max-words

Licence
MIT
Version
0.0.4
Deps
0
Size
4 kB
Vulns
0
Weekly
0

No Maintenance Intended

Build Status

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);

Keywords