1. jesumer Escat
  2. django-registration

Commits

James Bennett  committed 061b0da

And add the Django-style error message on the username field.

  • Participants
  • Parent commits 7dba2f7
  • Branches default

Comments (0)

Files changed (1)

File registration/forms.py

View file
     username = forms.RegexField(regex=r'^\w+$',
                                 max_length=30,
                                 widget=forms.TextInput(attrs=attrs_dict),
-                                label=_(u'username'))
+                                label=_(u'username'),
+                                error_messages={ 'invalid': _(u'This value must contain only letters, numbers and underscores.') })
     email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict,
                                                                maxlength=75)),
                              label=_(u'email address'))