-
Notifications
You must be signed in to change notification settings - Fork 8
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
Frontend: Email Verification Form Validation #431
Conversation
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.
There was a problem hiding this 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:
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.
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.
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. |
I resolved the git fetch conflicts and it is now ready to merge without any backward or forward conflict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
There was a problem hiding this 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
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.