Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 473 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 473 Bytes

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