mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
The field editor's shared inputs — font size, alignment, line height, label, required, read-only — took a `Control<any>` so one component could serve every field form. react-hook-form 7.88 types a control's `validate` option by the form's field names, and a function over "fontSize" | "textAlign" is not a function over any string, so no form's control was a `Control<any>` any more: 26 errors, one per shared input per form. The inputs now read the form from the <Form> they render inside, as Controller does when it is not handed a control. Every one of them already did through FormMessage, and every form renders them inside its own <Form>, so the control each one binds to is the one it was handed before. The `Control<any>`, its eslint-disable and the formControl prop go. Two forms spelled their values as the schema's output, `useForm<T>`. Under @hookform/resolvers 5 a zod resolver takes the schema's input and returns its output, so they now let the resolver type them. zod 4 types a coerced number's input as unknown; the field meta and the checkbox form say number, the type these forms were written against, which changes no parse. Co-authored-by: Hanzo Dev <[email protected]>