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

Frontend: Email Verification Form Validation #431

Merged

Conversation

surmelienes1
Copy link
Contributor

Any input was considered legitimate in the previous iteration of the email verification form because it lacked a validation mechanism. To avoid inaccurate situations, we had to define the inputs. As a result, I added a validation option to the email verification form.

Although it seems almost same in the browser, there have been significant changes made to the code and structure to deliver the best possible validation feature.

React-hook-form and Yup were used for validation and error handling, and bootstrap was utilized for error messaging as I indicated in #429.

Added the verification code form validation requiring exactly 4 digits to be entered.
Added this file to create the resend button with 3 minute timeout value.
Added the btn-grey class to allow the resend button to turn grey for 3 minutes when being clicked.
Added some necessary packages for validation purposes.
Updated the package-lock file to comply with the packages installed.
@surmelienes1 surmelienes1 added priority-medium Medium level priority issue status-needreview A review to the issue is needed feature New feature front-end Front-end related items labels Oct 29, 2022
@surmelienes1 surmelienes1 self-assigned this Oct 29, 2022
@surmelienes1 surmelienes1 linked an issue Oct 29, 2022 that may be closed by this pull request
3 tasks
Copy link
Contributor

@xltvy xltvy left a comment

Choose a reason for hiding this comment

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

I have reviewed your work. It is nice decision to use react-hook-form, Yup, and bootstrap for the integrity of the code. Well done. However there are some points I need to mention:

1- Probably your updates in the style.css file messed up the sign up / login buttons page alignment. We need to fix this before merging. You can see this below:
Ekran Resmi 2022-10-29 17 37 21

2- It is not a big issue but, I think we need better wording for the error message. 4 digits can mean something like "aaaa" is also okay, we can say 4 digit number instead. I have also provided the screenshot.
Ekran Resmi 2022-10-29 17 37 44

@xltvy xltvy added status-waitingresponse Author needs to review suggestions given. and removed status-needreview A review to the issue is needed labels Oct 29, 2022
Updated the sign up page with its latest version.
Changed the wording from "digits" to "digit numbers" so as to make it easier for users to understand the convention.
@surmelienes1
Copy link
Contributor Author

Thank you @xltvy for your careful inspection and comment!

The reason for this unintended alignment is because I was working with the old version of the sign-up page since your changes had not yet been applied on frontend dev. In addition, I had to update the style.css, so, there happened to be a mismatch between sign-up page and style.css file classes.

I have now fixed the sign-up page's relevant sections to reflect your modifications.

I have also added the word "digit numbers" instead of "digits" at the end of the warning given for the verification code input form.

@gokayyildiz
Copy link
Contributor

I resolved the git fetch conflicts and it is now ready to merge without any backward or forward conflict

Copy link
Contributor

@xltvy xltvy left a comment

Choose a reason for hiding this comment

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

Approved

Copy link
Contributor

@gokayyildiz gokayyildiz left a comment

Choose a reason for hiding this comment

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

ready to merge succesfully working

@gokayyildiz gokayyildiz merged commit 1a7e5b2 into frontend/dev Oct 30, 2022
@egemenatikk egemenatikk removed the status-waitingresponse Author needs to review suggestions given. label Oct 30, 2022
@egemenatikk egemenatikk added the Status: Completed Issue is solved label Oct 30, 2022
@surmelienes1 surmelienes1 linked an issue Oct 31, 2022 that may be closed by this pull request
5 tasks
@bahricanyesil bahricanyesil deleted the frontend/dev-emailVerification-form-validation branch November 2, 2022 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature front-end Front-end related items priority-medium Medium level priority issue Status: Completed Issue is solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontend: Adding Form Validation for Email Verification Page
4 participants