From 28a5d9e04f39745f7fbfedf1caa93d529f1a2af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Wed, 5 Aug 2026 12:39:55 -0700 Subject: [PATCH 1/4] Note ValidationContext.ObjectInstance is a throwaway placeholder for parameter/standalone validation --- .../System/ComponentModel/DataAnnotations/ValidationContext.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs index 45fce10a86b028..4bdfa6bf6af57f 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs @@ -148,6 +148,7 @@ public ValidationContext(object instance, string displayName, IServiceProvider? /// During validation, especially property-level validation, the object instance might be in an indeterminate state. /// For example, the property being validated, as well as other properties on the instance might not have been /// updated to their new values. + /// For ownerless parameters or standalone values (as in minimal APIs), is a meaningless placeholder. /// public object ObjectInstance { get; } From c8b4e85b1c963cf0a3610cdc0b51ef8bc94b8b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as?= <50237907+ViveliDuCh@users.noreply.github.com> Date: Wed, 5 Aug 2026 13:39:11 -0700 Subject: [PATCH 2/4] Copilot's phrasing suggestion Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../System/ComponentModel/DataAnnotations/ValidationContext.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs index 4bdfa6bf6af57f..dff22e5fe95a6e 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs @@ -148,7 +148,8 @@ public ValidationContext(object instance, string displayName, IServiceProvider? /// During validation, especially property-level validation, the object instance might be in an indeterminate state. /// For example, the property being validated, as well as other properties on the instance might not have been /// updated to their new values. - /// For ownerless parameters or standalone values (as in minimal APIs), is a meaningless placeholder. + /// When validation is performed without an owning object (for example, validating standalone values), + /// may be a placeholder and should not be treated as the owner of the value. /// public object ObjectInstance { get; } From 27820097064aba1dfe174aadaaafd86302e79bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as?= <50237907+ViveliDuCh@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:57:50 -0700 Subject: [PATCH 3/4] Wrap in tags Co-authored-by: Jeff Handley --- .../ComponentModel/DataAnnotations/ValidationContext.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs index dff22e5fe95a6e..22d516e3b49445 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs @@ -145,11 +145,15 @@ public ValidationContext(object instance, string displayName, IServiceProvider? /// Consume this instance with caution! /// /// + /// /// During validation, especially property-level validation, the object instance might be in an indeterminate state. /// For example, the property being validated, as well as other properties on the instance might not have been /// updated to their new values. + /// + /// /// When validation is performed without an owning object (for example, validating standalone values), /// may be a placeholder and should not be treated as the owner of the value. + /// /// public object ObjectInstance { get; } From 9c1d380bab89b73d90e7de8369619cad90aa3553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Thu, 6 Aug 2026 15:15:57 -0700 Subject: [PATCH 4/4] Wording consistency with api-docs --- .../System/ComponentModel/DataAnnotations/ValidationContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs index 22d516e3b49445..5c1a27ae2b8121 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationContext.cs @@ -152,7 +152,7 @@ public ValidationContext(object instance, string displayName, IServiceProvider? /// /// /// When validation is performed without an owning object (for example, validating standalone values), - /// may be a placeholder and should not be treated as the owner of the value. + /// might be a placeholder and should not be treated as the owner of the value. /// /// public object ObjectInstance { get; }