Skip to content

Commit f967bff

Browse files
author
Ron Petrusha
authored
Corrected version differences of ValidationContext.MemberName (#3040)
1 parent 54957b5 commit f967bff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.ComponentModel.DataAnnotations/ValidationContext.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@
356356
357357
## Remarks
358358
359-
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.
359+
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, you can change the default behavior so that the property returns the member name by adding 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 4.8, the property returns the member name. To restore the previous behavior, you can add the following setting to your app config file:
362362
363363
```xml
364364
<configuration>

0 commit comments

Comments
 (0)