Form handling with @prepared911/ui-forms, React Hook Form, and Zod validation.
Use @prepared911/ui-forms + Zod:
useZodForm for typed, schema-driven validation (onBlur by default)Form* wrappers instead of manual register + error wiringemailSchema, phoneSchema, …) for common masked fieldsformatMessage so each Zod message is already translatedAvoid:
register and manual errors.field?.messagemessage values (only ui-forms.schema.* keys are resolved for you)FormInput and register on the same fieldForm sets noValidate by default)Design guidance, shell selection, and field maps live in Forms (Blocks).
Wire GraphQL mutations, a failure message, and reset on success:
Share Zod schemas between client and server:
SettingsRow reads useFormContext — wrap rows in Form (not a submit shell):
Use useFieldArray with FormInput and explicit control:
Keep separate useZodForm instances per step or merge schemas at the final submit. Store partial data in component state between steps; reset each step form with defaultValues from accumulated data.
turbo/packages/ui-forms/README.md