package sample.validate;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
public class V1Form extends ActionForm{
private String StringData;
public String getStringData() {
return StringData;
}
public void setStringData(String stringData) {
StringData = stringData;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (StringData == null || StringData.equals("")) {
errors.add("", new ActionMessage("errors.invalid","Stringデータ"));
}
return errors;
}
}
|