I have the first name and last name fields in a form, but I want to use the same div to display any of their errors.
Form Fields:
<form:input path="firstName" id="firstName" cssErrorClass="errorStyle"/>
<form:input path="firstName" id="firstName" cssErrorClass="errorStyle"/>
I would like to be able to bind the form:errors to multiple paths such as below:
<form:errors path="firstName, lastName" element="div"/>
Is this possible?
How could I achieve this?
Use
One option may be to invest the words so
and then use
Reference : http://static.springsource.org/spring/docs/2.5.x/reference/view.html