Exemple #1
0
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     foreach (var validationRule in _validationRules)
     {
         if (!validationRule.IsValid(passwordChangeModel))
         {
             return(false);
         }
     }
     return(true);
 }
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(passwordChangeModel.PasswordHistoryItems == null ||
            !passwordChangeModel.PasswordHistoryItems.Any(x => x.PasswordText == passwordChangeModel.NewPassword));
 }
Exemple #3
0
 void SomeMethod(PasswordChangeModel passwordChangeModel)
 {
     _passwordValidator.IsValid(passwordChangeModel);
 }
Exemple #4
0
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(passwordChangeModel.NewPassword != passwordChangeModel.Username);
 }
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(_blackList == null || !_blackList.Contains(passwordChangeModel.NewPassword));
 }
Exemple #6
0
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(passwordChangeModel.NewPassword.Length >= _minLenght);
 }