classContactForm(forms.Form):name=forms.CharField(label=_("Name"),max_length=255,)email=forms.EmailField(label=_("Email address"))confirm_email=forms.EmailField(label=_("Confirm"))defclean(self):if(self.cleaned_data.get('email')!=self.cleaned_data.get('confirm_email')):raiseValidationError("Email addresses do not match.")returnself.cleaned_data