Password Complexity Checker
You are given a string representing a password as an argument. Return true if the password passes the following complexity criteria:
- Must have at least 8 characters.
- Must contain upper case and lower case characters.
- Must contain at least two numbers.
- 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.