Skip to content

Commit a1681c6

Browse files
closes google#34089
Updated validations.py python script. Fixed the behavior of validate_user function in validations.py.
1 parent b9ac666 commit a1681c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Course3/Lab4/validations.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def validate_user(username, minlen):
1818
# Usernames can't begin with a number
1919
if username[0].isnumeric():
2020
return False
21+
#Fixing the error by checking the first character:
2122
if username[0] == '.' or username[0] == '_':
2223
return False
2324
return True

0 commit comments

Comments
 (0)