class SingIn {
private String login;
private String password;
public SingIn(String login, String password) {
this.login = login;
this.password = password;
}
public String getLogin() {
return login;
}
public String getPassword() {
return password;
}
}
登录属性可以是电子邮件(模式“.+@.+”)或电话号码(模式“\+\d+”)。
是否可以使用 javax 注释以某种方式验证登录属性?