public class Admin extends ActionSupport implements ModelDriven<AdminData>
{
AdminData adminData = new AdminData();
public AdminData getModel()
{
return adminData;
}
@Validations(requiredStrings ={
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="emailId"),
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="password")}
public String auth()
{
}
@Validations(requiredStrings ={
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="emailId"),
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="firstName"),
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="surName"),
@RequiredStringValidator(type=ValidatorType.FIELD,fieldName="password")}
public String create() throws DatabaseException
{
}
}
我的问题是,当我调用create()
方法时,验证没有问题,但是当我调用auth()
方法时,验证有问题,因为当我调用 auth 方法时,它用于验证名字和姓氏。
并且在 AdminData.java 中有所有的 getset