Skip to content

Palmabit-IT/joi-max-words

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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