Answer the question
In order to leave comments, you need to log in
How to do error handling when the submit event is fired on the form?
There is a form in which there is an action attribute.
form.work-content__form#workForm(enctype="multipart/form-data" action='/api/works' method='post' )
document.getElementById("workForm").submit();
Answer the question
In order to leave comments, you need to log in
Make validation on the client, if everything is good then submit. Get a response from the server success or err and do what you want with it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question