A simple JOI extension to verify if strings conform to the objectid(like Mongo) format
This super cool package is a JOI extension that enables you to verify objectIds (like mongo document ids)
npm install joi-object-id-extention
const Joi = require('@hapi/joi');
const newJoi = require('joi-object-id-extention');
const schema = Joi.object({
id: newJoi.string().objectid()
})
Check out this blog post. Also feel free to contribute to this repo by raising PRs or creating relevant issues