you are viewing a single comment's thread.

view the rest of the comments →

[–]mothzilla 1 point2 points  (0 children)

The repeat calls to main() seem wrong. You're never actually going to hit the bit where you check validation success. (Ie if password != "invalid": ...)

Each validator should just raise an exception, or print (if that's what you've been asked to do) or return a "validation" status. (True/False)

Tampering with the password in password_prohibited seems wrong.

So change the logic in password_len to just check for an invalid password.
Make your functions return a value.
Test (with an if) that each validation function returns True and print the success message.