princid / Expense-Tracker

The objective of this project was to create an interactive and completely responsive Expense Tracker website which allows the user to track all of their expenses and income.
https://expense-tracker-psg.herokuapp.com/
MIT License
19 stars 21 forks source link

[Enhancement] Field basic validation on add/edit transaction #25

Closed kannananil closed 2 years ago

kannananil commented 2 years ago

Currently if any of the fields of the add/edit transaction form was empty while submitting the form there will be a error message shown in the top as "Something went wrong" as shown below since the backend server sends a 500.

Screenshot 2022-10-17 at 12 28 05 AM

It would be better if we could show a specific error dialog with a proper message which helps the users know which field was invalid without sending a request to the backend server.

Attaching a screenshot of the expected error dialog window

Screenshot 2022-10-17 at 12 25 00 AM
kannananil commented 2 years ago

@princid could you review this suggestion, if it seems valid please add required labels and I would like to work on this issue. Also would like to get your suggestions on the message as well as which are the required fields

kannananil commented 2 years ago

@princid the development for this enhancement is almost done if you could help me with the mandatory fields and default values for non mandatory fields I could commit and raise a PR for this

princid commented 2 years ago

Well done man! Go ahead and make a pull request.

kannananil commented 2 years ago

@princid, I have raised a PR for this issue please review it whenever possible. Thank you :)