Password Complexity Checker

You are given a string representing a password as an argument. Return true if the password passes the following complexity criteria:

  1. Must have at least 8 characters.
  2. Must contain upper case and lower case characters.
  3. Must contain at least two numbers.
  4. Must contain at least 2 of the following special characters !@#$%^&*()

Requirements

  • Must return either true or false

Example #1

solve("aaBB1234!@#")
>true

Example #2

solve("Test12!")
>false

Password is only 7 characters long and uses only one special character.

Example #3

solve("Test12[]{}~|??<>")
>false

Password contains special characters that are not approved.