The Spring MVC JSP tag library has a tag for rendering form errors. This makes it easy to render an error message next to, say, an input text field. However, it is common practice on many websites to also style the input text field itself (with a red border maybe) to highlight a validation error.
Is there any way of doing this with the Spring JSP tags or will I have to bake my own solution?
I have never used Spring MVC JSP tags but looking at the documentation it looks like
cssErrorClassis the way to go:Obviously you can now define
input.errorclass in your CSS stylesheet.