[Answered ]-Django: Form check if field has no error

2👍

✅

You can check if the form has errors.

<div class="form-group{% if field.errors %} has-error{% elif form.is_bound %} has-success{% endif %}">

This supposes the form variable in your template context is named form.

Leave a comment