Skip to content

Commit

Permalink
Feature/ Add series to link related articles
Browse files Browse the repository at this point in the history
  • Loading branch information
RangerCreaky committed Nov 4, 2024
1 parent b8603c1 commit 1a2320d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 5 additions & 2 deletions schema/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ export const SavePostSchema = z.object({
tags: z.string().array().max(5).optional(),
published: z.string().datetime().optional(),
seriesName: z.string()
.trim()
.optional()
.trim()
.min(1, "Series name cannot be empty")
.max(50, "Series name is too long")
.regex(/^[\w\s-]+$/, "Series name can only contain letters, numbers, spaces, and hyphens")
.optional()
});

export const PublishPostSchema = z.object({
Expand Down
6 changes: 0 additions & 6 deletions schema/series.ts

This file was deleted.

0 comments on commit 1a2320d

Please sign in to comment.