public ActionErrors validate(ActionMapping mapping, //Form
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((buddyEmail == null) || (buddyEmail.length() < 1) || (buddyEmail.indexOf("@") == -1))
errors.add("buddyEmail",
new ActionError("buddyEmail","error.buddyEmail.required"));
return errors;
}
//resource file
error.buddyEmail.required = Error;
//JSP file
<html:errors proprity = "buddyEmail" />
posted on 2006-01-10 20:43
happytian 阅读(86)
评论(0) 编辑 收藏