Beispiel #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));
 }
Beispiel #3
0
 void SomeMethod(PasswordChangeModel passwordChangeModel)
 {
     _passwordValidator.IsValid(passwordChangeModel);
 }
Beispiel #4
0
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(passwordChangeModel.NewPassword != passwordChangeModel.Username);
 }
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(_blackList == null || !_blackList.Contains(passwordChangeModel.NewPassword));
 }
Beispiel #6
0
 public bool IsValid(PasswordChangeModel passwordChangeModel)
 {
     return(passwordChangeModel.NewPassword.Length >= _minLenght);
 }