From 68f8bfda53573151307c710eb39e1bbf2e786194 Mon Sep 17 00:00:00 2001 From: nd Date: Sat, 13 Jul 2024 12:06:32 +0200 Subject: [PATCH] Update + `RequiredIfAttribute` can now be added multiple times to an element --- src/ObjectValidation/ObjectValidation.csproj | 2 +- src/ObjectValidation/RequiredIfAttribute.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ObjectValidation/ObjectValidation.csproj b/src/ObjectValidation/ObjectValidation.csproj index d68fe89..d68a09a 100644 --- a/src/ObjectValidation/ObjectValidation.csproj +++ b/src/ObjectValidation/ObjectValidation.csproj @@ -22,7 +22,7 @@ LICENSE True README.md - 2.5.0 + 2.6.1 embedded true Debug;Release;Trunk diff --git a/src/ObjectValidation/RequiredIfAttribute.cs b/src/ObjectValidation/RequiredIfAttribute.cs index bef90a8..e691737 100644 --- a/src/ObjectValidation/RequiredIfAttribute.cs +++ b/src/ObjectValidation/RequiredIfAttribute.cs @@ -12,6 +12,7 @@ namespace wan24.ObjectValidation /// Checked property name /// Values (one of the value is required in order to match this condition; if not given, the value is required if the checked property has a non- /// value) + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public class RequiredIfAttribute(string propertyName, params object?[] values) : RequiredAttribute() { ///