2.0.0 • Published 5 years ago

joi-mongoose-types v2.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

joi-mongoose-types

Joi extension for validate mongoose types like ObjectId and Model.

Installing

npm i joi-mongoose-types

Use

const Joi = require('joi');
const mongoose = require('mongoose');
const JoiMongooseTypes = require('joi-mongoose-types');

const JoiExtended = Joi.extend(JoiMongooseTypes(Joi, mongoose));

License

This project is licensed under the MIT License - see the LICENSE.md file for details