How to use the id function from joi
Find comprehensive JavaScript joi.id code examples handpicked from public code repositorys.
76 77 78 79 80 81 82 83 84 85 86return newAttachments } createAttachment.schema = { currentUser: Joi.any(), challengeId: Joi.id(), attachments: Joi.array().items(Joi.object().keys({ name: Joi.string().required(), url: Joi.string().uri().required(), fileSize: Joi.fileSize(),
+ 10 other calls in file
62 63 64 65 66 67 68 69 70 71 72 73async function getPhase (phaseId) { return helper.getById('Phase', phaseId) } getPhase.schema = { phaseId: Joi.id() } /** * Update phase.
+ 3 other calls in file
80 81 82 83 84 85 86 87 88 89 90createChallengeTimelineTemplate.schema = { data: Joi.object().keys({ typeId: Joi.id(), trackId: Joi.id(), timelineTemplateId: Joi.id(), isDefault: Joi.boolean().default(false).required() }).required() }
+ 5 other calls in file
79 80 81 82 83 84 85 86 87 88 89 90const ret = await helper.getById('ChallengeType', id) return ret } getChallengeType.schema = { id: Joi.id() } /** * Fully update challenge type.
+ 3 other calls in file
69 70 71 72 73 74 75 76 77 78 79 80async function getTimelineTemplate (timelineTemplateId) { return helper.getById('TimelineTemplate', timelineTemplateId) } getTimelineTemplate.schema = { timelineTemplateId: Joi.id() } /** * Update timeline template.
+ 6 other calls in file
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163status: Joi.string().valid(_.values(constants.challengeStatuses)), groups: Joi.array().items(Joi.optionalId()).unique(), // gitRepoURLs: Joi.array().items(Joi.string().uri()), terms: Joi.array().items(Joi.object().keys({ id: Joi.id(), roleId: Joi.id() })) }).required(), userToken: Joi.string().required() }
+ 18 other calls in file
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267groups: Joi.array().items(Joi.optionalId()).unique(), // gitRepoURLs: Joi.array().items(Joi.string().uri()), terms: Joi.array().items( Joi.object().keys({ id: Joi.id(), roleId: Joi.id(), }) ), }) .required(),
+ 59 other calls in file
506 507 508 509 510 511 512 513 514 515 516} } getGroup.schema = { currentUser: Joi.any(), groupId: Joi.id(), // defined in app-bootstrap criteria: Joi.object().keys({ includeSubGroups: Joi.boolean().default(false), includeParentGroup: Joi.boolean().default(false), flattenGroupIdTree: Joi.boolean().default(false),
+ 9 other calls in file
joi.string is the most popular function in joi (40578 examples)