[Answered ]-Rendering/Raising A Validation Error on an HTML Template in Django

1👍

Apart from using models.EmailField (which you should be doing) you need to change {{ contactform.errors }} to {{ contactform.email.errors }}

1👍

I figured it out. Before the validation error could even be raised, I was attempting to generate a brand new form.

contactform = ContactForm()

^That code in my views.py file would make it so an entirely new form was created on my HTML template. Once I got rid of it, everything worked like it should.

👤Will

Leave a comment