doque
doque

Reputation: 2733

use additional cssErrorClass in Spring::Form

I have this input field:

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

When an error during validation occurs, the CSS class of the element is changed to "error". However, I would like the CSS class to be "error text", as in: keep its regular class and add "error" instead of replacing it.

Is this possible?

Upvotes: 4

Views: 4073

Answers (1)

JB Nizet
JB Nizet

Reputation: 691785

Have you tried with cssErrorClass="error text"?

Upvotes: 3

Related Questions