optional solution error code
This commit is contained in:
@@ -31,11 +31,12 @@ const insertErrorCodeSchema = Joi.object({
|
|||||||
is_active: Joi.boolean().default(true),
|
is_active: Joi.boolean().default(true),
|
||||||
solution: Joi.array()
|
solution: Joi.array()
|
||||||
.items(solutionSchema)
|
.items(solutionSchema)
|
||||||
.min(1)
|
.optional(),
|
||||||
.required()
|
// .min(1)
|
||||||
.messages({
|
// .required()
|
||||||
"array.min": "Error code must have at least 1 solution",
|
// .messages({
|
||||||
}),
|
// "array.min": "Error code must have at least 1 solution",
|
||||||
|
// }),
|
||||||
spareparts: Joi.array()
|
spareparts: Joi.array()
|
||||||
.items(Joi.number().integer())
|
.items(Joi.number().integer())
|
||||||
.optional(),
|
.optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user