From b4146b9aa9a084b6639f527ff5ed8494fc77df8a Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 25 Apr 2019 13:47:11 -0700 Subject: [PATCH 1/2] Revised ValidationContext.MemberName --- .../ValidationContext.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml b/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml index 7b3d56f01c7..eace7bc36a2 100644 --- a/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml +++ b/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml @@ -339,9 +339,20 @@ , the `MemberName` property returns `null`. Starting with .NET Framework 4.8, you can change the default behavio so that the property returns the member name by adding the following setting to your app config file: + +```xml + + + + + +``` + ]]> From bbb81e96f827cce49c7089ab937b980d688e6e8f Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Fri, 26 Apr 2019 08:59:17 -0700 Subject: [PATCH 2/2] Update xml/System.ComponentModel.DataAnnotations/ValidationContext.xml Corrected typo. Co-Authored-By: rpetrusha --- .../ValidationContext.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml b/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml index eace7bc36a2..1ea9c580472 100644 --- a/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml +++ b/xml/System.ComponentModel.DataAnnotations/ValidationContext.xml @@ -343,7 +343,7 @@ This property represents an entity member name, not the name of a corresponding data field. Therefore, this name is not a localized name. It should be set only for property or parameter contexts. -In .NET Framework 4.7.2 and earlier versions, when using a custom , the `MemberName` property returns `null`. Starting with .NET Framework 4.8, you can change the default behavio so that the property returns the member name by adding the following setting to your app config file: +In .NET Framework 4.7.2 and earlier versions, when using a custom , the `MemberName` property returns `null`. Starting with .NET Framework 4.8, you can change the default behavior so that the property returns the member name by adding the following setting to your app config file: ```xml @@ -461,4 +461,4 @@ In .NET Framework 4.7.2 and earlier versions, when using a custom - \ No newline at end of file +