-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Validate strong Password by validate_password.js #1148
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
Conversation
|
Clean this up. |
|
Can you provide more details on it |
|
did some cleanup and added a commit . Can u review and comment on it? |
profnandaa
left a comment
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.
Please clean up this PR, so many unrelated changes in the diff.
profnandaa
left a comment
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.
@gayathrigs27
Thanks for your contribution! 🎉 Could you please remove any unrelated changes?
I have a few comments below.
| export default function validatePassword(str) { | ||
| const format = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/; | ||
| assertString(str); | ||
| return (/[a-z]/.test(str)) && (/[A-Z]/.test(str)) && (/[\d]/.test(str)) && format.test(str); |
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.
This looks good.
Few suggestions:
- Perhaps we
minLengthparameter? - Can rename this validator to
isStrongPassword
|
Closing in favor of newer PR raised #1348 |
No description provided.