-
-
Save myndzi/a926583155aa901a3ac95d1797874dab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Joi = require('joi'); | |
const schema = { | |
a: Joi.number(), | |
b: Joi.number(), | |
}; | |
const value = { | |
a: 'AAA', | |
b: "BBB" | |
}; | |
const result = Joi.validate(value, schema, { abortEarly: false }); | |
console.log(require('util').inspect(result.error.details)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment