title: javax validation for login(email or phone)
body: <pre><code>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;
      }
  }
  </code></pre>
  
  <p>Login property could be an email(pattern ".+@.+") or a phone number(pattern "\+\d+").</p>
  
  <p>Is it possible somehow with javax annotation to validate the login property?</p>