Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show error messages in Login and EditProfile forms for required fields #839

Merged

Conversation

brrkrmn
Copy link
Collaborator

@brrkrmn brrkrmn commented Oct 7, 2023

Summary

When trying to submit the login and editProfile forms without filling the required fields, no error message or feedback is given to the user.
If the user focuses on an input and then leaves it empty, the error message is seen, however, if the input is blank and not touched by the user until the submission, no message is shown.

Closes #838

Changes

  • The inputs that should show error messages are triggered by setFieldTouched in their submit functions. I chose this approach for consistency because the signup form uses it for all its inputs.
  • Through Yup validation, phone and email fields in the edit profile form now show an error message if both are empty.

Final Results:

branch-edit.mov

ts/92817363/070d39bb-3cc7-4f56-8c10-342d792138b1

branch-login.mov

Copy link
Collaborator

@NdibeRaymond NdibeRaymond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this patch @tuxology and it works as described, but I've been away from the project for some time now so you should probably take a look too especially when it comes to commit practices

@NdibeRaymond
Copy link
Collaborator

@brrkrmn it seems like the following files EditTeam.jsx, editTeamScripts.js is similar to what we have for EditProfile. Maybe you can investigate and see if that be fixed too?

@brrkrmn
Copy link
Collaborator Author

brrkrmn commented Oct 8, 2023

@brrkrmn it seems like the following files EditTeam.jsx, editTeamScripts.js is similar to what we have for EditProfile. Maybe you can investigate and see if that be fixed too?

Sure, on it ☺️

@brrkrmn
Copy link
Collaborator Author

brrkrmn commented Oct 10, 2023

@brrkrmn it seems like the following files EditTeam.jsx, editTeamScripts.js is similar to what we have for EditProfile. Maybe you can investigate and see if that be fixed too?

I implemented the same solution for these files in #857, waiting for reviews 🙂

@tuxology tuxology merged commit 826b467 into unstructuredstudio:master Oct 10, 2023
@brrkrmn brrkrmn deleted the edit-profile-feedback-feature branch October 12, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login and EditProfile forms not showing error messages when required fields left empty
3 participants