From b9e2f91e23f82fcfda4717d2e6230b5468933be4 Mon Sep 17 00:00:00 2001 From: Lubos Hladik Date: Fri, 26 Jul 2024 15:13:53 +0200 Subject: [PATCH] Fix processing of ValidationResult.Success --- src/MiniValidationPlus/MiniValidatorPlus.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MiniValidationPlus/MiniValidatorPlus.cs b/src/MiniValidationPlus/MiniValidatorPlus.cs index 930cc18..686ed09 100644 --- a/src/MiniValidationPlus/MiniValidatorPlus.cs +++ b/src/MiniValidationPlus/MiniValidatorPlus.cs @@ -700,7 +700,9 @@ private static IDictionary MapToFinalErrorsResult(Dictionary validationResults, Dictionary> errors, string? prefix) { - foreach (var result in validationResults) + var failedValidationResults = validationResults.Where(x => x != ValidationResult.Success); + + foreach (var result in failedValidationResults) { var hasMemberNames = false; foreach (var memberName in result.MemberNames)