Skip to content

Instantly share code, notes, and snippets.

@edymerchk
Created May 11, 2014 00:44
Show Gist options
  • Select an option

  • Save edymerchk/51f5e416216ef44a0847 to your computer and use it in GitHub Desktop.

Select an option

Save edymerchk/51f5e416216ef44a0847 to your computer and use it in GitHub Desktop.
at least one digit
at least one lowercase
at least one uppercase
at least one special character
regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[ ! @ # $ % ^ & * ( ) _ - + =])/
regex.test(req.body.password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment