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