form-next-complex-schema.ts — ui Source File
Architecture documentation for form-next-complex-schema.ts, a typescript file in the ui codebase. 1 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR ae4ed9c2_4beb_f5aa_bc82_ed3428a78bb6["form-next-complex-schema.ts"] 6802ce19_522d_e5fb_e458_8826d9f6952e["zod"] ae4ed9c2_4beb_f5aa_bc82_ed3428a78bb6 --> 6802ce19_522d_e5fb_e458_8826d9f6952e a48cc779_ad07_39b5_2ccd_6c96646a048d["form-next-complex-action.ts"] a48cc779_ad07_39b5_2ccd_6c96646a048d --> ae4ed9c2_4beb_f5aa_bc82_ed3428a78bb6 2e87948d_2c15_1526_651d_5e33c02cce6e["form-next-complex.tsx"] 2e87948d_2c15_1526_651d_5e33c02cce6e --> ae4ed9c2_4beb_f5aa_bc82_ed3428a78bb6 style ae4ed9c2_4beb_f5aa_bc82_ed3428a78bb6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { z } from "zod"
export const formSchema = z.object({
plan: z
.string({
required_error: "Please select a subscription plan",
})
.min(1, "Please select a subscription plan")
.refine((value) => value === "basic" || value === "pro", {
message: "Invalid plan selection. Please choose Basic or Pro",
}),
billingPeriod: z
.string({
required_error: "Please select a billing period",
})
.min(1, "Please select a billing period"),
addons: z
.array(z.string())
.min(1, "Please select at least one add-on")
.max(3, "You can select up to 3 add-ons")
.refine(
(value) => value.every((addon) => addons.some((a) => a.id === addon)),
{
message: "You selected an invalid add-on",
}
),
emailNotifications: z.boolean(),
})
export type FormState = {
values: z.infer<typeof formSchema>
errors: null | Partial<Record<keyof z.infer<typeof formSchema>, string[]>>
success: boolean
}
export const addons = [
{
id: "analytics",
title: "Analytics",
description: "Advanced analytics and reporting",
},
{
id: "backup",
title: "Backup",
description: "Automated daily backups",
},
{
id: "support",
title: "Priority Support",
description: "24/7 premium customer support",
},
] as const
Domain
Types
Dependencies
- zod
Imported By
Source
Frequently Asked Questions
What does form-next-complex-schema.ts do?
form-next-complex-schema.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain.
What does form-next-complex-schema.ts depend on?
form-next-complex-schema.ts imports 1 module(s): zod.
What files import form-next-complex-schema.ts?
form-next-complex-schema.ts is imported by 2 file(s): form-next-complex-action.ts, form-next-complex.tsx.
Where is form-next-complex-schema.ts in the architecture?
form-next-complex-schema.ts is located at apps/v4/registry/new-york-v4/examples/form-next-complex-schema.ts (domain: ComponentRegistry, directory: apps/v4/registry/new-york-v4/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free