[Fixed]-Django Form Not Validating

1👍

You did not name your input on your template correctly. It should be:

<input type="email" size="50" name="verCode"> </input>
👤Wiredo

0👍

A better way would have been, if you had used loop to produce the fields in the template.

Check this out:

{% for field in form %}
<div> 
<label>{{field.label_tag}}</label>
<div> {{field}} </div>
</div>
{% endfor %}

This will help you in preventing these errors in future and writing lot less code in template.

Leave a comment