﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22318	Adding Form.has_error() to easily check if a given error has happened.	loic84	nobody	"Since #17413, it's possible to know, not only if a field has errors, but also what these errors are.

I propose that we add an API to easily check if a given error has happened.

This would enable logic like this in the view:

{{{
if form.has_error('email', 'not_verified'):
    context['email_not_verified'] = True
}}}

When a given error happens, I often want to display HTML that describes how to resolve the issue, (usually with links to the relevant sections in the docs which in turn require url reversing); stuffing these in the error message is neither clean (HTML belongs to the templates), nor practical. Following a given error, one may also want to perform actions that typically belongs to the views, like using the message framework.
"	New feature	closed	Forms	dev	Normal	fixed			Accepted	1	0	0	0	0	0
