Challenge : Password Validator | Sololearn: Learn to code for FREE!


Challenge : Password Validator

input a string (password: Domces223) and then check if the pass is valid or not. pass has to have: 1.Longer from 6 to 20 characters 2.atleast one uppercase letter (A-Z) 3.a number (1-9) 4.atleast one lowercase letter (a-z) if it is valid, print True. else print False. i think this will be harder i could give the hardest one, but it will ruin the fun good luck... you'll need it

8/8/2017 11:31:44 AM

Domces Games

29 Answers

New Answer


My very simple 1-liner checker ( 1 line input 1 line checker ) :)


I hate RegExp therefore i am not sure it works as it should, but why not... ?


well done guys... i dont know which is the best because you all did well so i wont put a check mark, but say that you all did well on this... i have more challenges to give, if you want, just put an upvote on this awnser new challenge is up


Here's my attempt at it in Python. You also can't use whitespaces, as you can't in most passwords.


I had never used regular expressions, I learned a bit about that. Thanks!


heres mine in c#

+5 Not hard with Character class methods in Java :D.


I was working on another challenge for password strength when I came upon this one so I had to try ^^ And here's the one for pwd strength if you'd like to check out


A simple (cramped, almost one-line) regex-y response in Ruby


Check out mine. :)


Hope you like my code!


Here's my solution:


simples password validator


my code


Password validation with code of mistake If the return is 15, then the password has passed the check. The number from 0 to 14 means an error. For example: Code of mistake 10 (binary 1010) indicates an error in "uppercase" and "number"


I'm not even sure if it works but: please I need feedback


Validation... Check Also My code..



Not really efficient using regex, since i had to use postive look ahead multiple times but it gets the job done.


I made mine print out what is wrong with the password. It could be shorter ^^