Skip to content

Latest commit

 

History

History

15_Password-Strength

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Password Strength

What You'll Do

You're building a sign up component and need to validate whether a user's desired password is secure enough.

Given a password (string) return true if the password meets the following criteria and false if it doesn't.

Password criteria:

  • One lowercase letter
  • One uppercase letter
  • One special character (!@#$%^&*)
  • One number
  • At least 8 characters long

Requirements

  • Use regex to test whether the password is valid
  • Use a ternary operator to return "Your password is valid" if it meets all requirements and "Your password is not valid, try again" if it doesn't.