Does anyone know if I can use JS.dispatch
or JS.exec
to submit a form, but also have the constraint validations run.
I can trigger a form submit with: JS.dispatch("submit", to: "#form-id")
, but that will bypass the client side validations.
Ideally what I need is a way to call requestSubmit on the form. Because that acts as if you’d press the button and so client-side validations are run.