mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(tools): challenge schema array validation (#58077)
This commit is contained in:
@@ -102,14 +102,12 @@ const quizJoi = Joi.object().keys({
|
||||
text: Joi.string().required(),
|
||||
distractors: Joi.array()
|
||||
.items(Joi.string().required())
|
||||
.min(3)
|
||||
.max(3)
|
||||
.length(3)
|
||||
.required(),
|
||||
answer: Joi.string().required()
|
||||
})
|
||||
)
|
||||
.min(20)
|
||||
.max(20)
|
||||
.length(20)
|
||||
.required()
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user