有没有办法从验证错误中删除项目符号。
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
String method = request.getParameter("method");
ActionErrors errors = new ActionErrors();
if (method != null) {
if (method.equals("changepwd")) {
if (this.password == null || this.password.length() < 1) {
errors.add("password", new ![enter image description here][1]ActionMessage("errors.required","Password"));
//TODO: add 'error.name.required' key to your resources
}
if (this.cnfpassword == null || this.cnfpassword.length() < 1) {
errors.add("cnfpassword", new ActionMessage("errors.required","Confirm Password"));
//TODO: add 'error.name.required' key to your resources
}
}
}
return errors;
}
答案 0 :(得分:1)
使用以下消息键,此处显示默认值(我认为;我不记得):
errors.header=<h3><font color="red">Validation Errors</font></h3><ul>
errors.footer=</ul>
errors.prefix=<li>
errors.suffix=</li>