Views file class for django framework which is a text input area and compares the entered text with the text in another area
class ContactForm(forms.Form): name = forms.CharField(max_length=100, required=True) message = forms.CharField(widget=forms.Textarea, required=True) def clean(self): cleaned_data = super(ContactForm, self).clean() name = cleaned_data.get("name") message = cleaned_data.get("message") if name == "django": raise forms.ValidationError("Django is a framework, not a person")