129
rated 0 times
[
130]
[
1]
/ answers: 1 / hits: 29593
/ 8 Years ago, wed, april 20, 2016, 12:00:00
I am trying to create nested schema in joi and it is throwing error
[Error: Object schema cannot be a joi schema]
var nestedSchema = joi.object({
b: joi.number()
});
var base = joi.object({
a: joi.string(),
nestedData:joi.object(nestedSchema)
});
How should i define nested schema in joi?
More From » node.js