You are given a string password.
Your task is to determine whether the password is valid according to the following rules:
A-Z).a-z).0-9).!@#$%^&*()-+.Return true if the password satisfies all of the rules, and false otherwise.
"Abcdef1!"
True
The password has 8 characters, contains an uppercase letter ('A'), a lowercase letter ('b'), a digit ('1'), and a special character ('!'). All rules are satisfied.
"Short1!"
False
The password is only 7 characters long, which is fewer than the required 8.
"abcdefgh1!"
False
The password has no uppercase letter.
"ABCDEFGH1!"
False
The password has no lowercase letter.
"Abcdef1!"
True