1
0
Fork 0

Login.py: fix function name

Bug487-WuYuhan-Refactor
Lan Hui 2022-11-03 22:02:32 +08:00
parent 3cfec31c3f
commit f0b5adc5e4
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class UserName:
self.username = username
def validate(self):
if gen(self.username) > 20:
if len(self.username) > 20:
return f'{self.username} is too long. The user name cannot exceed 20 characters.'
if self.username.startswith('.'): # a user name must not start with a dot
return 'Period (.) is not allowed as the first letter in the user name.'