regexPassword

Credit to: Codewars

Write a function that will validate a password to make sure it meets the follow criteria:

  • At least six characters long
  • Contains a lowercase letter
  • Contains an uppercase leter
  • contains a number

Valid passwords will only be alphanumeric Characters.

  const validate = (password) {
    return /(yourcode here)/.test(password);
  }