Skip to content

Commit

Permalink
Added validation to FlashcardSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
fkozlicki committed May 7, 2024
1 parent 3cb6b71 commit 12504ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/validators/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const CreateUserSchema = z.object({
});

const FlashcardSchema = z.object({
term: z.string(),
definition: z.string(),
term: z.string().min(1, "Specify term of your flashcard"),
definition: z.string().min(1, "Specify definition of your flashcard"),
position: z.number(),
});

Expand Down

0 comments on commit 12504ea

Please sign in to comment.