📜  joi 对象 id 验证 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:53.395000             🧑  作者: Mango

代码示例1
npm i joi-objectid

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

// now you can use Joi.objectId to validate the post request sent by user