diff --git a/src/server/schemas/index.ts b/src/server/schemas/index.ts index aaad1a4..8693f6f 100644 --- a/src/server/schemas/index.ts +++ b/src/server/schemas/index.ts @@ -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: @@ -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.", })