We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b33e31 commit babcf47Copy full SHA for babcf47
curriculum/schema/challenge-schema.js
@@ -209,7 +209,11 @@ const schema = Joi.object()
209
}),
210
forumTopicId: Joi.number(),
211
id: Joi.objectId().required(),
212
- instructions: Joi.string().allow(''),
+ instructions: Joi.string().when('challengeType', {
213
+ is: [challengeTypes.pythonProject, challengeTypes.codeAllyCert],
214
+ then: Joi.string().min(1).required(),
215
+ otherwise: Joi.string().allow('')
216
+ }),
217
isComingSoon: Joi.bool(),
218
isLocked: Joi.bool(),
219
isPrivate: Joi.bool(),
0 commit comments