form-atoms / form-atoms

Atomic form primitives for Jotai

Home Page:https://codesandbox.io/s/getting-started-with-form-atoms-v2-ddhgq2?file=/src/App.tsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass setter to the `Validate` callback.

MiroslavPetrik opened this issue · comments

Is your feature request related to a problem? Please describe.
I have a special listAtom which has each list item wrapped as an internal formAtom. When validating a form with the listAtom, I need to also validate the internal forms. For that, the set(form.validate, event) must be called.

Describe the solution you'd like
Simply extend the Validate callback to also get the set jotai function.

Describe alternatives you've considered
None