1.2.0 • Published 7 years ago

joi-date-extensions v1.2.0

Weekly downloads
24,876
License
BSD-3-Clause
Repository
github
Last release
7 years ago

joi-date-extensions

Joi extensions for extra date rules.

npm version Build Status

NSP Status Known Vulnerabilities

Lead Maintainer: Nicolas Morel

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-date-extensions');
const Joi = BaseJoi.extend(Extension);

const schema = Joi.date().format('YYYY-MM-DD');

API

See the API Reference.