appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.35k stars 3.72k forks source link

[Feature]: Validation should be shown on click of submit button in form and JSON form widget. #30935

Open kamleshvisvkarma opened 9 months ago

kamleshvisvkarma commented 9 months ago

Is there an existing issue for this?

Summary

Do we have any plan to show validation on submit button?

Instead of disabling the submit button, we need to keep it enabled and show validation on its click.

Because if any field is accidentally left out in case of disabling the button. In this case, the button remains disabled and the user does not know where the error is

Why should this be worked on?

Disabling the submit button until all form fields are correctly filled can be frustrating for users, especially if they make a mistake and need to go back and fix it.

kamleshvisvkarma commented 9 months ago

https://stackblitz.com/edit/form-validation-reactjs?file=src%2FApp.js

Whatever validation we want, you can see it by opening this link. If the submit button is not disabled or when I click on the submit button the validation message of the required field is shown.

kamleshvisvkarma commented 8 months ago

Is there any update on this... @Nikhil-Nandagopal @somangshu @kamakshibhat-appsmith @LagunaElectric

Nikhil-Nandagopal commented 8 months ago

@kamleshvisvkarma we don't have this on our roadmap yet.

  1. If a field is marked as required and a user focuses on it but does not enter a value, it will show the error
  2. You can indicate required fields with a * in the label
  3. You can manually add errors to the fields on submit by having text widgets next to / under them and controlling their visibility on submit