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 e706f7f commit 28bb798Copy full SHA for 28bb798
project/packages/dtos/src/questions.ts
@@ -11,11 +11,11 @@ export const getQuestionsQuerySchema = z.object({
11
});
12
13
const commonQuestionFields = z.object({
14
- q_title: z.string().min(1),
15
- q_desc: z.string().min(1),
+ q_title: z.string().min(1, { message: "Title must not be empty" }),
+ q_desc: z.string().min(1, { message: "Description must not be empty" }),
16
q_category: z
17
.array(categorySchema)
18
- .min(1)
+ .min(1, { message: "At least one category is required" })
19
// enforce uniqueness of categories
20
.refine((categories) => new Set(categories).size === categories.length, {
21
message: "Categories must be unique",
0 commit comments