Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leonidkuznetsov18/8baf248c1b664b8cad4ac0f932d55d1e to your computer and use it in GitHub Desktop.
Save leonidkuznetsov18/8baf248c1b664b8cad4ac0f932d55d1e to your computer and use it in GitHub Desktop.
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment