add tags validaiton

This commit is contained in:
Alex Holliday committed 2026-05-20 10:28:39 -07:00
1 parent 1f7344f2e6
commit 8aa55885e5
1 file changed
+10
+10
View File
@@ -0,0 +1,10 @@
import { z } from "zod";
export const tagSchema = z.object({
name: z.string().min(1, "Please enter a tag name"),
color: z
.string()
.regex(/^#([0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value (e.g. #13715B)"),
});
export type TagFormData = z.infer<typeof tagSchema>;