1. panosmm
  2. django-registration


ubernostrum  committed 3c60993

Docstring for RegistrationForm.clean()

  • Participants
  • Parent commits 2ccbbb8
  • Branches default

Comments (0)

Files changed (1)

File registration/forms.py

View file
  • Ignore whitespace
         raise forms.ValidationError(_(u'This username is already taken. Please choose another.'))
     def clean(self):
+        """
+        Verifies that the values entered into the two password fields
+        match. Note that an error here will end up in
+        ``non_field_errors()`` because it doesn't apply to a single
+        field.
+        """
         if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data:
             if self.cleaned_data['password1'] != self.cleaned_data['password2']:
                 raise forms.ValidationError(_(u'You must type the same password each time'))