This question evaluates string-processing and input-validation skills, including case-insensitive substring detection, character class checks, pattern matching for special symbols, and handling edge cases like consecutive character limits.
You are given a password string p. Validate it against a set of rules and return all rules that the password violates.
"MyPassWord123"
violates this rule.
A-Z
) and
at least one lowercase
letter (
a-z
).
{!, @, #}
).
"aaaaa"
violates;
"aaaa"
is OK).
p
.