Can we get the error count inside this tag? or a sign if there is an error besides the error message itself? Thanks.
Printable View
Can we get the error count inside this tag? or a sign if there is an error besides the error message itself? Thanks.
I have exactly this question. I tried this:
Despite the fact that there were error codes coming in of the form *.myCommand.* that were picked up fine by the <form:errors> tag, my general message didn't display.Code:<form:form commandName="myCommand">
<spring:bind path="myCommand">
<c:if test="${status.error}">
One or more fields in your submission contained errors.
</c:if>
</spring:bind>
...
Obviously, using <form:errors path="*"> isn't good because I don't want a list of field errors, I just want a general message.
Ah, I just figured this out by looking at a different thread. This is one thing you can do:
This will only display "Your general error message." and won't display the field errors.Code:<form:errors path="*">
Your general error message.
</form:errors>