joi-mongoose-types
v2.0.0
Published
Best way to validate payloads containing mongoose types
Downloads
13
Maintainers
Readme
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