You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Make sure that you return an object with both `values` and `errors` properties. Their default values should be an empty object. For example: `{}`.
438
438
- The keys of the `errors` object should match the `name` values of your fields, but they _must_ be hierarchical rather than a single key for deep errors:
439
-
`❌ { "participants.1.name": someErr }` will not set or clear properly - instead, use `✅ { "participants": [null, someErr] }` as this is reachable
440
-
as `errors.participants[1]` - you can still prepare your errors using flat keys, and then use a function like this one from the zod resolver:
439
+
`❌ { "participants.1.name": someErr }` will not set or clear properly - instead, use `✅ { participants: [null, { name: someErr } ] }` as this is reachable
440
+
as `errors.participants[1].name` - you can still prepare your errors using flat keys, and then use a function like this one from the zod resolver:
0 commit comments