csvalpha / sofia

S.O.F.I.A. - Streepsysteem der C.S.V. Alpha
https://streep.csvalpha.nl
MIT License
5 stars 2 forks source link

In most modals that create an object, client-side validation is absent #844

Open Ellen-Wittingen opened 1 year ago

Ellen-Wittingen commented 1 year ago

How to reproduce

Open a new object modal. For example, go to http://localhost:5000/activities and click on Nieuwe activiteit

Expected behaviour

When submitting the form with invalid/missing values the form should not be submitted and error messages should be shown beneath the invalid inputs. Like in here https://getbootstrap.com/docs/5.2/forms/validation/#supported-elements.

This can be implemented with https://getbootstrap.com/docs/5.2/forms/validation/

Current behaviour

The form is submitted and the modal is closed. The server sends back an error message, which is displayed in a toast to the user (see image). So there is only server-side validation and the user has to fill in the form all over again and hope that the data is correct this time.

image