Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def passwordCheck(inputString)
- caps = ("A".."Z")
- all_caps = caps.to_a.join
- lowercase = ("a".."z")
- all_lower = lowercase.to_a.join
- digit = ("0".."9")
- all_digit = digit.to_a.join
- if inputString.length >= 5 then
- if inputString.count(all_caps) >= 1 then
- if inputString.count(all_lower) >= 1 then
- if inputString.count(all_digit) >= 1 then
- return true
- end
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment