···2828 max_length=50,
2929 regex=r'^[a-zA-Z0-9-_@]+$',
3030 error_messages={
3131- 'required': _('Please enter your name'),
3232- 'invalid': _('Alphanumeric characters and underscores and dashes only (a-z, 0-9, _, -, @)')
3131+ 'required': _('Please enter a username'),
3232+ 'invalid': _('Username can only have alphanumeric characters and underscores and dashes (a-z, 0-9, _, -, @)')
3333 },
3434 widget=forms.TextInput(
3535 attrs={'placeholder': _('Username'), 'class': 'input input-bordered w-full'}),
···55555656 if password != password_confirm:
5757 raise forms.ValidationError(
5858- "password and password_confirm does not match"
5858+ "Password and Confirm Password do not match."
5959 )
6060 if len(password) < 10:
6161 raise forms.ValidationError(
6262- "password must be at least 10 characters long"
6262+ "Password must be at least 10 characters long."
6363 )
64646565 if PawUser.objects.filter(username=cleaned_data.get("username")).exists():
6666 raise forms.ValidationError(
6767- "An account with this username already exists"
6767+ "An account with this username already exists."
6868 )
6969 if PawUser.objects.filter(email=cleaned_data.get("email")).exists():
7070 raise forms.ValidationError(
7171- "An account with this email already exists"
7171+ "An account with this email already exists."
7272 )
7373 return cleaned_data
7474