Skip to content

A simple JOI extension to verify if strings conform to the objectid(like Mongo) format

Notifications You must be signed in to change notification settings

shubhamzanwar/joi-object-id-extention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Joi-object-id-extention

This super cool package is a JOI extension that enables you to verify objectIds (like mongo document ids)

Installation

npm install joi-object-id-extention

Usage

const Joi = require('@hapi/joi');
const newJoi = require('joi-object-id-extention');

const schema = Joi.object({
    id: newJoi.string().objectid()
})
Want to make your own?

Check out this blog post. Also feel free to contribute to this repo by raising PRs or creating relevant issues

About

A simple JOI extension to verify if strings conform to the objectid(like Mongo) format

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published