⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usersregform.java

📁 这是图书管理系统 ~~用JSP实现的 大家要的可以
💻 JAVA
字号:
package jthink.formbean;
import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;
import jthink.bean.db.*;
public class UsersRegForm extends ActionForm {
    private String users_Adds;
    private String users_Name;
    private String users_Phone;
    private String users_Pwd;
    private String users_Pwd1;
    private String users_Sex;
    public void setUsers_Sex(String users_Sex) {
        this.users_Sex = users_Sex;
    }

    public void setUsers_Pwd1(String users_Pwd1) {
        this.users_Pwd1 = users_Pwd1;
    }

    public void setUsers_Pwd(String users_Pwd) {
        this.users_Pwd = users_Pwd;
    }

    public void setUsers_Phone(String users_Phone) {
        this.users_Phone = users_Phone;
    }

    public void setUsers_Name(String users_Name) {
        this.users_Name = users_Name;
    }

    public void setUsers_Adds(String users_Adds) {
        this.users_Adds = users_Adds;
    }

    public String getUsers_Adds() {
        return users_Adds;
    }

    public String getUsers_Name() {
        return users_Name;
    }

    public String getUsers_Phone() {
        return users_Phone;
    }

    public String getUsers_Pwd() {
        return users_Pwd;
    }

    public String getUsers_Pwd1() {
        return users_Pwd1;
    }

    public String getUsers_Sex() {
        return users_Sex;
    }

    public ActionErrors validate(ActionMapping actionMapping,
                                 HttpServletRequest httpServletRequest) {
        ActionErrors err = new ActionErrors();

          if(this.getUsers_Name() == null || this.getUsers_Name().length()<1)
        {
            err.add("nameerr", new ActionMessage("jsp.user.reg.nameerr"));
        }else if(!DataBean.HasName(this.getUsers_Name()))
        {
            err.add("nameerr", new ActionMessage("jsp.user.reg.nameerr1"));
        }else if(this.getUsers_Pwd() == null || this.getUsers_Pwd().length()<1)
        {
            err.add("pwderr", new ActionMessage("jsp.user.reg.pwderr"));
        }else if(this.getUsers_Pwd1() == null || this.getUsers_Pwd1().length()<1)
        {
            err.add("pwd1err", new ActionMessage("jsp.user.reg.pwd1err"));
        }else if(!this.getUsers_Pwd1().equals(this.getUsers_Pwd()))
        {
            err.add("pwd2err", new ActionMessage("jsp.user.reg.pwd2err"));
        }else if(this.getUsers_Sex() == null || this.getUsers_Sex().length()<1)
        {
            err.add("sexerr", new ActionMessage("jsp.user.reg.sexerr"));
        }else if(this.getUsers_Phone() == null || this.getUsers_Phone().length()<1)
        {
            err.add("phoneerr", new ActionMessage("jsp.user.reg.phoneerr"));
        }else if(this.getUsers_Adds() == null || this.getUsers_Adds().length()<1)
        {
            err.add("addserr", new ActionMessage("jsp.user.reg.addserr"));
        }
        return err;
    }

    public void reset(ActionMapping actionMapping,
                      HttpServletRequest servletRequest) {
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -