feat: improve ux and security
This commit is contained in:
@@ -8,7 +8,7 @@ const props = defineProps<{
|
||||
|
||||
const schema = z.object({
|
||||
name: z.string({ error: "Required" }),
|
||||
path: z.string({ error: "Required" }),
|
||||
path: z.string({ error: "Required" }).startsWith("/", "Must start with /"),
|
||||
url: z.url({ error: (err) => err.code === "invalid_type" ? "Required" : "Invalid format", }),
|
||||
disabled: z.boolean().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user