Joi extension for validate mongoose types like ObjectId
and Model
.
npm i joi-mongoose-types
const Joi = require('joi');
const mongoose = require('mongoose');
const JoiMongooseTypes = require('joi-mongoose-types');
const JoiExtended = Joi.extend(JoiMongooseTypes(Joi, mongoose));
This project is licensed under the MIT License - see the LICENSE.md file for details