Implementr form

This commit is contained in:
2025-06-26 13:46:32 +02:00
parent 711fb34021
commit da0524a4fc
12 changed files with 903 additions and 4 deletions

13
src/lib/schema/url.ts Normal file
View File

@@ -0,0 +1,13 @@
import { z } from "zod";
export const urlFormSchema = z.object({
url: z.string().url("Please enter a valid URL"),
slug: z
.string()
.min(1, "Slug is required")
.max(50, "Slug must be 50 characters or less")
.regex(
/^[a-zA-Z0-9-_]+$/,
"Slug can only contain letters, numbers, hyphens, and underscores"
)
})