Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling from the <form:errors> tag [SPR-3390] #8073

spring-issuemaster opened this issue Apr 18, 2007 · 3 comments


None yet
2 participants
Copy link

commented Apr 18, 2007

William Shields opened SPR-3390 and commented

form:errors is a pretty crude mechanism for displaying multiple errors. It uses a default delimieter of <br>. It should allow for more sophisticated methods of displaying errors.

In the simple case, I would like to see "schemes" introduced. For example:

<form:errors path="*" scheme="ul"/>

which would craete:


Note: if there were no errors the enclosing <ul> tag should not be rendered.

Example schemes could be:


Potentially this may require another attribute to distinguish between the CSS class given to the enclosing tags and that given to each element, although if the enclosing tag got the value of cssClass, a CSS selector could resolve that problem without adding an attribute.

In the more complicated example, it is possibly worthwhile (although arguably unnecessary if you have sufficient schemes as defined above) to allow either the programmer to write their own schemes or to have sufficient attributes to achieve the same thing.


<form:scheme name="errorTable">


<th>Error #</th>
<th>Error Description</th>

<form:loop var="count">

<td><c:out value="${count}"/></td>




The simple example of this kind of thing would be adding attributes:

<form:errors path="*" block="ul" item="li"/>

alternatively have a heading block within:

<form:errors path="*" block="ul" item="li">

<p>The following errors have occurred:</p>
Anywa, you get the idea.

Affects: 2.0.4

Issue Links:

  • #13859 Extend form:errors with something like errorElement ("is duplicated by")

20 votes, 14 watchers


This comment has been minimized.

Copy link
Collaborator Author

commented Jul 10, 2007


This comment has been minimized.

Copy link
Collaborator Author

commented Jul 10, 2007

Rick Evans commented

Hi William

I agree that form:errors/ is a pretty coarse mechanism for displaying errors. The delimiter between individual errors can now be controlled (see the Javadoc), but it is nowhere near as flexible as you'd like.

I am not going to have enough time to address this myself in the 2.1 timeframe though. I'm going to have to let this one slip to a later release... I guess it needs to accrue more votes before it becomes a priority.



This comment has been minimized.

Copy link
Collaborator Author

commented Jan 12, 2019

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.