HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((username == null) || (username.length() < 1))
errors.add("username",
new ActionError("error.username.required"));
if (!password.equals(password2))
errors.add("password2",
new ActionError("error.password.match"));
if ((fromAddress == null) || (fromAddress.length() < 1))
errors.add("fromAddress",
new ActionError("error.fromAddress.required"));
else {
int atSign = fromAddress.indexOf("@");
if ((atSign < 1) || (atSign >= (fromAddress.length() - 1)))
errors.add("fromAddress",
new ActionError("error.fromAddress.format",
fromAddress));
}
if ((fullName == null) || (fullName.length() < 1))
errors.add("fullName",
new ActionError("error.fullName.required"));
if ((replyToAddress != null) && (replyToAddress.length() > 0)) {
int atSign = replyToAddress.indexOf("@");
if ((atSign < 1) || (atSign >= (replyToAddress.length() - 1)))
errors.add("replyToAddress",
new ActionError("error.replyToAddress.format",
replyToAddress));
}
return errors;