Example #1
0
 public void setPassword(String password) {
   if (password == null) {
     return;
   }
   if (!Validation.isValidPassword(password)) {
     throw new IllegalArgumentException("Password must be atleast 6 characters long");
   }
   this.password = password;
 }
Example #2
0
 public void setEmail(String email) {
   if (!Validation.isValidEmail(email)) {
     throw new IllegalArgumentException("Not a valid Email");
   }
   this.email = email;
 }