refactor: migrated to zod v4

This commit is contained in:
2025-07-27 12:53:06 +05:30
parent df65949e63
commit 1dba1bdb8c

View File

@@ -15,7 +15,11 @@ import { useTheme } from "@/components/theme-provider";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
const downloadFormSchema = z.object({ const downloadFormSchema = z.object({
url: z.string().min(1, { message: "URL is required" }).url({message: "Invalid URL format." }), url: z.url({
error: (issue) => issue.input === undefined || issue.input === null || issue.input === ""
? "URL is required"
: "Invalid URL format"
}),
}); });
export default function HomePage() { export default function HomePage() {