Access onSubmitMeta inside the validator for conditional schema validation #1637
Unanswered
kortvarsel
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm using onSubmitMeta to support multiple types of form submissions via onSubmit. However, I’d like each submission type to use a different schema for validation. For example, an "autosave" submission only saves a draft and doesn’t require the form to be complete, whereas a "publish" submission does.
Currently, meta is only accessible within the onSubmit handler. If it were also accessible inside validators.onSubmit and validators.onSubmitAsync, it would allow us to define different validation logic based on submission behavior.
Here’s a link to the original Discord discussion:
https://discord.com/channels/719702312431386674/1399366356717142026
Beta Was this translation helpful? Give feedback.
All reactions