A Joi extension to validation MongoDB ObjectId formats
npm install @meanie/joi-object-id


A Joi extension to automatically convert ISO date strings to object-id objects
string validatorObjectId instances``shell
#npm
npm install @meanie/joi-object-id
#yarn
yarn add @meanie/joi-object-id
`
js
const Joi = require('@hapi/joi');
const JoiObjectId = require('@meanie/joi-object-id');module.exports = Joi.extend(JoiObjectId);
`$3
`js
const schema = Joi.object({
user: Joi.string().objectId(),
});
``Please report any bugs, issues, suggestions and feature requests in the meanie-joi-object-id issue tracker.
Pull requests are welcome! If you would like to contribute to Meanie, please check out the Meanie contributing guidelines.
This package has been kindly sponsored by Hello Club, an all in one club and membership management solution complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!
(MIT License)
Copyright 2019-2020, Adam Reis