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

feat: email validation middleware added (#381) #387

Merged
merged 6 commits into from
Oct 6, 2023

Conversation

destryptor
Copy link
Contributor

Fixes Issue

My PR closes #381

πŸ‘¨β€πŸ’» Changes proposed(What did you do ?)

I have added a custom middleware for email validation called "emailValidator" and have used it in the required request handlers. This aims to prevent duplication and is a modular approach to handle email-validation.

βœ”οΈ Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.

Note to reviewers

I believe the code should work fine just as before since I personally tested it, but if any issue arises, please let me know, I'll earnestly fix them.

πŸ“· Screenshots

Screenshot-2023-10-06-155207

@vercel
Copy link

vercel bot commented Oct 6, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @Dun-sin on Vercel.

@Dun-sin first needs to authorize it.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

@destryptor destryptor changed the title enh: email validation middleware added (#381) feat: email validation middleware added (#381) Oct 6, 2023
@destryptor
Copy link
Contributor Author

Please let me know if I did anything wrong, I have tried sticking to the rules strictly

@Dun-sin
Copy link
Owner

Dun-sin commented Oct 6, 2023

Please let me know if I did anything wrong, I have tried sticking to the rules strictly

There's a new rule added in case you missed it, it's fine it was added today. It says to show a screen recording of your working software if you worked on the backend

server/controllers/userController.js Outdated Show resolved Hide resolved
@Dun-sin
Copy link
Owner

Dun-sin commented Oct 6, 2023

Please let me know if I did anything wrong, I have tried sticking to the rules strictly

There's a new rule added in case you missed it, it's fine it was added today. It says to show a screen recording of your working software if you worked on the backend

@destryptor

@destryptor
Copy link
Contributor Author

Please let me know if I did anything wrong, I have tried sticking to the rules strictly

There's a new rule added in case you missed it, it's fine it was added today. It says to show a screen recording of your working software if you worked on the backend

@destryptor

yeah just a second im uploading the recording on a cloud to embed it here

@destryptor
Copy link
Contributor Author

destryptor commented Oct 6, 2023

tydlye.mp4

So what I've done to show functionality is that I've used Postman to send the POST and DELETE requests to the server where the emailValidator is required. I've sent JSONs with both valid and invalid emails to show that the validation works as intended.
Apart from that. the tab spaces have been fixed as you asked for.

(PS: The final commit introduced the changes that were made in the main repository before I re-synced my fork, I pulled those changes and then committed again)

Copy link
Owner

@Dun-sin Dun-sin left a comment

Choose a reason for hiding this comment

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

You did great, thanks for contributing, I hope you will stick around and continue to contribute to this project.

Consider giving this project a star and joining the community discord server if you haven't for more resources and opportunities to connect with others. πŸ‘‰πŸ½hereπŸ‘ˆπŸ½

@Dun-sin Dun-sin merged commit 826201b into Dun-sin:main Oct 6, 2023
1 of 2 checks passed
@destryptor
Copy link
Contributor Author

Thanks! I've already starred the project. Thanks for giving me the opportunity:)

@Dun-sin
Copy link
Owner

Dun-sin commented Oct 6, 2023

Thanks! I've already starred the project. Thanks for giving me the opportunity:)

you are welcome

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.

[ENHANCEMENT] Separate middleware for Email Validation
2 participants