AF04
useForm received something other than a configuration object with a schema field.
In development this reads:
attaform useForm received an invalid configuration (a schema directly, no argument, or no
schemafield). Pass it asuseForm({ schema })— the schema is one of several configuration options. Seehttps://attaform.dev/docs/reading-the-form/the-formfor the full configuration shape.
What happened
The argument to useForm is an options bag, and the schema is one of several fields on it. Passing the schema directly (or nothing at all) is the most common first-run stumble, so Attaform names it precisely instead of failing deep inside the validator.
How to fix it
const schema = z.object({ email: z.string().email() })
// Instead of useForm(schema):
const form = useForm({ schema })
The form documents every configuration option.