mirror of
https://github.com/neosubhamoy/neodlp-extension.git
synced 2025-12-20 00:39:34 +05:30
refactor: migrated to zod v4
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user