Any Idea how to remove the error below? It is from my validation.xml. It is already redundant for me… Thank you.
Username must not be blanks
Password must not be blanks
Username must not be blanks ---> How to remove this?
UserName:
Password must not be blanks ---> How to remove this?
Password:
Actually what i want to do is the error message to be on the right side of the field.
UserName: ___________________ * Username must not be blanks
Password:____________________ * Password must not be blanks
Use the simple template for your form.
And then use the
<s:fielderror>tag for put your field errors wherever you want.Then you only have to play with CSS to achieve that layout.
EDIT: It seems that if you put
<s:fielderror>your field errors will be in a list. You have two options, edit the templatefielderror.ftlthat it’s inside thestruts2.jaror access to the specific error with<s:property>like this:This code will only extract the first validation error of the field.