Skip to content

Commit

Permalink
Update custom slug schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Apr 1, 2024
1 parent faa5082 commit 3c824d5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/server/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ export const CreateLinkSchema = z.object({
}),
slug: z
.string()
.min(1, {
message:
"Short link is required. Enter a custom slug or click on 'Randomize' button.",
.min(4, {
message: "Short link is required and must be at least 4 characters long.",
})
.regex(/^[a-zA-Z0-9_-]*$/, {
message:
Expand Down Expand Up @@ -55,7 +54,9 @@ export const EditLinkSchema = z.object({
}),
slug: z
.string()
.min(1, { message: "Short link is required." })
.min(4, {
message: "Short link is required and must be at least 4 characters long.",
})
.regex(/^[a-zA-Z0-9_-]*$/, {
message: "Custom short link must not contain any blank spaces.",
})
Expand Down

0 comments on commit 3c824d5

Please sign in to comment.