Hi. I'm using Struts validator framework, here I'm using <b>automatic</b> validation at the server side. My form contains two text fields, email and password. How to display error messages in front of each text field ? How to assign a CSS style to error messages ? Thanks.
If you specify a property name in your <html:errors> tag, it will only display errors for that property. So, if you write <html:errors property="email" /> only messages for email will be displayed.
Regarding applying a CSS style, you can do that by supplying an errors.header and errors.footer key in your message resources file. For example: