def clean(self):
        if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data:
            if self.cleaned_data['password1'] != self.cleaned_data['password2']:
                raise forms.ValidationError(_('The two password fields didn\'t match.'))
        return self.cleaned_data
Validates that the values entered into the two password fields match.
dataset/ETHPy150Open bread-and-pepper/django-userena/userena/forms.py/SignupForm.clean