Change submission logic for regular form posts - #853
Conversation
|
An alternative suggestion would be that you could expose the field state or validity via the onSubmit or onBeforeSubmit callback so we can make a decision ourselves. As it stands currently, there's no way to stop a form submission based on its validity unless we connect to the store ourselves or save isValid in the state based on the data in onUpdate. |
|
I'll have to give this a tiny bit more thought. Are there use-cases where developers expect |
|
So it seems that currently Maybe it would be better to move some things around, here's some suggestions:
If you tell me what you think is best I would be happy to implement it. |
|
The first option seems like the simplest way to go - hopefully, we can avoid adding extra props. In the future, we can consider something like |
If using
onSubmit, it is only called when the form is valid. If using anactioninstead, the form can be submitted at any time regardless of the validity. This is not consistent.