From 172dfab316ab1a7ed248af01d166c9e09562ba38 Mon Sep 17 00:00:00 2001 From: Abhijit Date: Thu, 10 Aug 2023 08:46:27 +0000 Subject: [PATCH] Closes: #1 Updated validations.py python script. Fixed the behavior of validate_user function in validations.py. --- Course3/Lab4/validations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Course3/Lab4/validations.py b/Course3/Lab4/validations.py index b18de65a2e..6a96c53f06 100644 --- a/Course3/Lab4/validations.py +++ b/Course3/Lab4/validations.py @@ -1,3 +1,4 @@ + #!/usr/bin/env python3 import re @@ -20,5 +21,8 @@ def validate_user(username, minlen): return False return True - +print(validate_user("blue.kale", 3)) # True +print(validate_user("1blue.kale", 3)) # Currently True, should be False +print(validate_user("red_quinoa", 4)) # True +print(validate_user("1red_quinoa", 4)) # Currently True, should be False