﻿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
4554	Newsforms: {{ field.error }} in HTML Template is HTML (ul) but should be Text (plain)	djangoproject.com@…	Adrian Holovaty	"Using the newforms library I do something like that in my html template:
{{{
{% for field in form %}
   {% if field.errors %}<p class=""error"">{{ field.errors }}</p>{% endif %}
   <label class=""required"">{{ field.label}}</label>{{field}}<br>
   {% if field.help_text %}<p class=""help"">{{ field.help_text }}</p>{% endif %}
{% endfor %}
}}}
Which renders fine as long as no field has errors. If I the user made an error and in field.errors for that reason is an error message to display '' {{field.errors }}'' renders to something like this: ''<ul class=""errorlist""><li>This field is required.</li></ul>''.[[BR]]
Which actually seems wrong because in this type of usage of the newforms extension I don't want <ul> and <li> html tags in my code because I do them myself (css and what not). ''{{ field.errors}}'' behaves differently from ''{{ field }}'' or ''{{ field.help_text }}'' here. [[BR]]
Adding a as_text (''{{ field.errors.as_text}}'') to does fix the problem for the moment but seems inconsistent."		closed	Forms	dev		wontfix			Unreviewed	0	0	0	0	0	0
