8000 Update ValidationContext.MemberName Property to reflect a recent chan… · CAndRyan/dotnet-api-docs@0acf7c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0acf7c4

Browse files
HongGitmairaw
authored andcommitted
Update ValidationContext.MemberName Property to reflect a recent change (dotnet#3470)
* update the doc to reflect a recent change in this property * Update the doc to reflect on a recent change to MemberName * Update xml/System.ComponentModel.DataAnnotations/ValidationContext.xml Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * Update xml/System.ComponentModel.DataAnnotations/ValidationContext.xml Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * update - rewordinng for RTM * Update xml/System.ComponentModel.DataAnnotations/ValidationContext.xml Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * Update xml/System.ComponentModel.DataAnnotations/ValidationContext.xml Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * remove extra space
1 parent da3b415 commit 0acf7c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xml/System.ComponentModel.DataAnnotations/ValidationContext.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
359359
This property represents an entity member name, not the name of a corresponding data field. Therefore, this name is not localized. It should be set only for property or parameter contexts.
360360
361-
In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.ComponentModel.DataAnnotations.ValidationAttribute?displayProperty=nameWithType>, the `MemberName` property returns `null`. Starting with .NET Framework 4.8, the property returns the member name. To restore the previous behavior, you can add the following setting to your app config file:
361+
In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.ComponentModel.DataAnnotations.ValidationAttribute?displayProperty=nameWithType>, the `MemberName` property returns `null`. Starting with [.NET Framework October 2019 Preview of Quality Rollup](https://devblogs.microsoft.com/dotnet/net-framework-october-2019-preview-of-quality-rollup/) for .NET Framework 4.8, the property returns the member name if you add the following setting to your *web.config* file:
362362
363363
```xml
364364
<configuration>
@@ -368,6 +368,10 @@ In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.C
368368
</configuration>
369369
```
370370
371+
Without this setting, this property returns `null` with .NET Framework October 2019 Preview of Quality Rollup or later versions.
372+
373+
In .NET Framework 4.8 version prior to the October 2019 update, this property returns member name without the configuration setting. If you change your *web.config* file as shown in the previous example, the property returns `null`.
374+
371375
]]></format>
372376
</remarks>
373377
</Docs>

0 commit comments

Comments
 (0)
0