8000 GitHub - pebble/joi-objectid: A MongoDB ObjectId validator for Joi
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pebble/joi-objectid

Folders and files

< AADF td class="react-directory-row-name-cell-small-screen" colSpan="2">
NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')(Joi);

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

Installation

npm install joi-objectid --save

Development

running tests

  • make test

Sponsored by

Pebble Technology!

License

MIT

About

A MongoDB ObjectId validator for Joi

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0