// Copyright (c) The Geekeey Authors // SPDX-License-Identifier: EUPL-1.2 namespace Geekeey.Request.Validation; /// /// Represents the result of executing one or more validations against a given object or request. /// public sealed class Validation { /// /// Represents the result of executing one or more validations against a given object or request. /// /// /// This class contains the list of validation problems identified during the validation process. /// A validation is considered successful if no problems are found. /// public Validation(IEnumerable problems) { Problems = [.. problems]; } /// /// Whether the validation was successful. /// public bool IsValid => Problems.Count is 0; /// /// The problems that were found during validation. /// public IReadOnlyList Problems { get; } }