From a1681c679e54993546b5bcb81a0e56ddd621b413 Mon Sep 17 00:00:00 2001 From: Mohamed Date: Wed, 6 Dec 2023 07:56:03 +0000 Subject: [PATCH] closes #34089 Updated validations.py python script. Fixed the behavior of validate_user function in validations.py. --- Course3/Lab4/validations.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Course3/Lab4/validations.py b/Course3/Lab4/validations.py index e3f9c22d82..30b46f9588 100644 --- a/Course3/Lab4/validations.py +++ b/Course3/Lab4/validations.py @@ -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