Skip to content

Joi extension for validate mongoose types like ObjectId and Model.

License

Notifications You must be signed in to change notification settings

LucGranato/joi-mongoose-types

Repository files navigation

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

About

Joi extension for validate mongoose types like ObjectId and Model.

Resources

License

Stars

Watchers

Forks

Packages

No packages published