Well I believe you are more expert and experienced personality than me. I am having an error and i am using django 3.0.3 and python 3.8.5 and VS code as an IDE. I am using validationError to raise error. in forms.py i am using condition if email and varify_email fields are not match than raise error but its not raising error ....I am so tired and getting no help from anywhere.
here is my code ___
------forms.py-------
class FormName(forms.Form):
name = forms.CharField( required=True)
email = forms.EmailField( required=True)
vmail = forms.EmailField( required=True)
text = forms.CharField(widget = forms.Textarea)
def clean(value):
cleaned_data = super().clean()
name = cleaned_data.get("name")
email = cleaned_data.get("email")
vmail = cleaned_data.get("vmail")
if email != vmail:
raise ValidationError("Emails are not match")
--------views.py-----
def forms_web(request):
forming = forms.FormName()
if request.method == 'POST':
forming = forms.FormName(request.POST)
if forming.is_valid():
#