Use optional cssErrorClass in Spring :: Form

I have this input field:

<form:input path="deliveryAddressFirstName" id="deliveryAddressFirstName" cssClass="text" cssErrorClass="error"/>

When an error occurs during validation, the CSS class of the element changes to "error." However, I would like the CSS class to be an “error text”, as in: keep it a regular class and add an “error” instead of a replacement.

Is it possible?

+3
source share
1 answer

Have you tried using cssErrorClass="error text"?

+3
source

All Articles