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