Login.py: fix function name

pull/57/head
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 self.username = username
def validate(self): 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.' 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 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.' return 'Period (.) is not allowed as the first letter in the user name.'