vinniecent / joi-date-extensions

Joi extensions for dates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Joi extensions for dates

License:Other


Languages

Language:JavaScript 100.0%