Skip to content

Commit

Permalink
zod url
Browse files Browse the repository at this point in the history
  • Loading branch information
NexVeridian committed Feb 27, 2024
1 parent 85f1aa2 commit ad12fc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/create/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { z } from "zod";

export const formSchema = z.object({
url: z.string().min(4,
{ message: "The URL must be at least 4 characters long" }
url: z.string().url("The URL is not valid").min(2,
{ message: "The URL must be at least 2 characters long" }
).max(100
, { message: "The URL must be at most 100 characters long" }),
});

0 comments on commit ad12fc2

Please sign in to comment.