Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Latest commit

 

History

History
34 lines (22 loc) · 1.41 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.41 KB

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.