7 kyu
Password validator
2,335 of 7,526tdowek1
Description:
Description
Your job is to create a simple password validation function, as seen on many websites.
The rules for a valid password are as follows:
- There needs to be at least 1 uppercase letter.
- There needs to be at least 1 lowercase letter.
- There needs to be at least 1 number.
- The password needs to be at least 8 characters long.
You are permitted to use any methods to validate the password.
Examples:
password("Abcd1234"); ===> true
password("Abcd123"); ===> false
password("abcd1234"); ===> false
password("AbcdefGhijKlmnopQRsTuvwxyZ1234567890"); ===> true
password("ABCD1234"); ===> false
password("Ab1!@#$%^&*()-_+={}[]|\:;?/>.<,"); ===> true;
password("!@#$%^&*()-_+={}[]|\:;?/>.<,"); ===> false;
Extra info
- You will only be passed strings.
- The string can contain any standard keyboard character.
- Accepted strings can be any length, as long as they are 8 characters or more.
Fundamentals
Regular Expressions
Algorithms
Similar Kata:
Stats:
Created | Jan 27, 2016 |
Published | Jan 30, 2016 |
Warriors Trained | 11028 |
Total Skips | 134 |
Total Code Submissions | 21996 |
Total Times Completed | 7526 |
JavaScript Completions | 2335 |
Ruby Completions | 124 |
Python Completions | 4825 |
C# Completions | 143 |
C++ Completions | 197 |
Total Stars | 115 |
% of votes with a positive feedback rating | 93% of 661 |
Total "Very Satisfied" Votes | 571 |
Total "Somewhat Satisfied" Votes | 82 |
Total "Not Satisfied" Votes | 8 |