Profile inputs accepting empty values
Opened this issue · 1 comments
Describe the bug
On the profile page, we can add/update our bio and social handles. When we are adding or updating the values, the existing code is accepting empty values too, and no validation check is made before submitting an empty value. This is also leading to an unnecessary network call, which is an expensive task.
To Reproduce
Steps to reproduce the behavior:
- Login to user-story
- Navigate to your profile(Route: '/myProfile')
- Click on the pencil icon for any input field (E.g: LinkedIn username, Twitter handle, etc).
- This opens up a text field and a save icon beside it.
- Keep the input field empty(clear if any prior input was fed).
- Click on the save icon, we can notice that there's no validation check made on empty strings.
Expected behavior
A clear and concise description of what you expected to happen.
Ideally, the users should not be allowed to submit an empty string. If the user wants to remove any of the links or values of their profiles, a separate remove function could be added, but accepting an empty string is not a good idea.
Logs
If applicable, add logs to help explain your problem (e.g. the error message and/or exception traceback).
Environment (please complete the following information):
- OS: Windows 11
- Browser: Chrome
Additional context
Add any other context about the problem here.
@cyntss @mharshita @SundeepChand, I'd like to work on this and get it fixed.