-
Notifications
You must be signed in to change notification settings - Fork 7
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
Password validation feature #6
base: 3-add-password-requirements-in-register-page
Are you sure you want to change the base?
Password validation feature #6
Conversation
Added all contributors.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Silent-Watcher is attempting to deploy a commit to the Akash Deep's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Update code based on review @Silent-Watcher
@@ -8,6 +8,12 @@ const registerUser = async (req, res, next) => { | |||
if (existingUser) { | |||
return res.status(400).json({ message: `User Already Exist` }); | |||
} | |||
|
|||
const validationResult = registerSchema.validate({password}); |
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.
Require registerSchema
const { registerSchema } = require("../validation/auth.validation");
@@ -2,8 +2,9 @@ const express = require("express"); | |||
const router = express.Router(); | |||
const authControllers = require("../controllers/auth"); | |||
const wrapAsync = require("../middlewares/wrapAsync"); | |||
const { registerSchema } = require("../validation/auth.validation"); |
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.
Remove all changes.
Add password validation in the back-end based on the given requirements
this will resolve issue #3
Let me know your thoughts or share any additional requests—your input helps me improve! 😀