JavaScript · Beginner · Ticket 5Ticket #5 · from Tomás Reyes, Support Lead
  1. Example
  2. Warm-up 1
  3. Warm-up 2
  4. Ticket
Brief
NEW TICKET#5 · Sign-up

Tell people which password rule they broke

Tomás Reyes · Support Lead
Opened today

“Every week someone writes in angry because sign-up said “Password too weak” and nothing else. The form can list what's wrong if it knows. Our rules are simple: 12 characters or more, not one of the common passwords on our list, and not containing the name part of your email (the bit before the @), when that name has at least 3 letters, so jo@ doesn't ban the word “journey”. Capital letters don't make a password different here: PassWord1234 is still password1234. Can you write passwordProblems?”

YOUR PLAN
  1. 1Watch an example2 min
  2. 2Warm-up 11 min
  3. 3Warm-up 21 min
  4. 4Fix the ticket11 min
BY THE END YOU CAN
  • Collect messages in an array with push
  • Check text with includes
  • Compare text without caring about case
About 15 minutes
Four short steps. Nothing is timed, and you can leave any time.