Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Joi validate usage
node v18.11.0
version:
1.0.0
endpoint
share
tweet
var joi = require("joi"); const schema = joi.object({ name: joi.string().min(3).required(), }); const fakeBody = { name: "course1" }; const result = schema.validate(fakeBody); console.log(result);
Loading…
no comments
sign in
to comment