Skip to content

Commit

Permalink
closes google#34089
Browse files Browse the repository at this point in the history
Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
  • Loading branch information
Mohamed-Elmanzalawi committed Dec 6, 2023
1 parent b9ac666 commit a1681c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Course3/Lab4/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def validate_user(username, minlen):
# Usernames can't begin with a number
if username[0].isnumeric():
return False
#Fixing the error by checking the first character:
if username[0] == '.' or username[0] == '_':
return False
return True
Expand Down

0 comments on commit a1681c6

Please sign in to comment.