snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const formSchema = z.object({
|
||||
title: z
|
||||
.string()
|
||||
.min(5, "Bug title must be at least 5 characters.")
|
||||
.max(32, "Bug title must be at most 32 characters."),
|
||||
description: z
|
||||
.string()
|
||||
.min(20, "Description must be at least 20 characters.")
|
||||
.max(100, "Description must be at most 100 characters."),
|
||||
})
|
||||
|
||||
export type FormState = {
|
||||
values: z.infer<typeof formSchema>
|
||||
errors: null | Partial<Record<keyof z.infer<typeof formSchema>, string[]>>
|
||||
success: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user