Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/apps/profiles/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def clean_username(self):
raise forms.ValidationError(
"Usernames should not contain special characters."
)
if (len(data) > 15) or (len(data) < 5):
raise forms.ValidationError(
"Username must have at least 5 characters and at most 15 characters"
)
return data

class Meta:
Expand Down