Problem:
I am working on struts 2.
I have one text field and have put validation (with xml)on the text field if its blank, throw an error.
But the field error I am getting is in black colour.
Does anyone have idea how to display the field error in red colour.
Solution:
U can the use the following tag in your .css Stylesheet file
.errorMessage {
color: red;
font-size: 0.8em;
}
And include this Stylesheet in the file where u have the text field.
Source : http://www.roseindia.net/struts/struts2/validations/Struts2-annotations.shtml
No comments:
Post a Comment