Socket
Socket
Sign inDemoInstall

joi-objectid

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    joi-objectid

A MongoDB ObjectId validator for Joi


Version published
Maintainers
1
Install size
3.94 kB
Created

Readme

Source

joi-objectid

A MongoDB ObjectId validator for Joi.

Build Status

use

joi-objectid validates that the value is an alphanumeric string of 24 characters in length.

It's used just like you'd use any other Joi type.

var Joi = require('joi');
Joi.objectId = require('joi-objectid');

var schema = {
  id: Joi.objectId()
, name: Joi.string().max(100)
, date: Joi.date()
}

Installation

npm install joi-objectid --save

Development

running tests
  • make test runs tests

Sponsored by

Pebble Technology!

License

MIT

FAQs

Last updated on 20 Sep 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc