-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathusersInfo.db
More file actions
27 lines (26 loc) · 789 Bytes
/
usersInfo.db
File metadata and controls
27 lines (26 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
if(
len(username)==0
or len(password)==0
or len(email)==0
or len(age)==0
or len(phonenumber)==0
or len(location)==0
or len(gender)==0
):
return "Please fill in all input fields!"
elif not len(username)>=4:
return "Username should have at least 4 characters!"
elif not re.match(r'^[\W\.-]+@[\W\.-]+\.\W+$';email):
return "incorrect email!"
elif not len(password)>=5:
return "password length must be at least 5 characters"
elif not phonenumber.isdigit():
return "invalid phone number!"
elif not age.isdigit age():
return "invalid age!"
elif gender.lover()not in ['male','female']
return "Gender should be male or female"
else :
return None
print("Error checking user info format:{str(e)})
return "An error occurred during user info validation."