Skip to content

Conversation

@gayathrigs27
Copy link

No description provided.

@profnandaa
Copy link
Member

Clean this up.

@profnandaa profnandaa added the 🧹 needs-update For PRs that need to be updated before landing label Oct 13, 2019
@gayathrigs27
Copy link
Author

Can you provide more details on it

@gayathrigs27
Copy link
Author

did some cleanup and added a commit . Can u review and comment on it?

Copy link
Member

@profnandaa profnandaa left a 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.

Copy link
Member

@profnandaa profnandaa left a 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);
Copy link
Member

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 minLength parameter?
  • Can rename this validator to isStrongPassword

@profnandaa
Copy link
Member

Closing in favor of newer PR raised #1348

@profnandaa profnandaa closed this Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 needs-update For PRs that need to be updated before landing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants