diff --git a/Documentation/compatibility/aspnet-ASP.NET ValidationContext.MemberName is null sometimes.md b/Documentation/compatibility/aspnet-ASP.NET ValidationContext.MemberName is null sometimes.md new file mode 100644 index 000000000..25a61e962 --- /dev/null +++ b/Documentation/compatibility/aspnet-ASP.NET ValidationContext.MemberName is null sometimes.md @@ -0,0 +1,34 @@ +## ASP.NET ValidationContext.MemberName is not NULL when using custom DataAnnotations.ValidationAttribute + +### Version Introduced +4.8 + +### Change Description +When using custom `DataAnnotations.ValidationAttribute`, `System.ComponentModel.DataAnnotations.ValidationContext.MemberName` returns null. This issue is fixed in .NET 4.8. + + +### Recommended Action +Starting from .NET 4.8, the default behavior stays the same. Please use the following appsettings to retrieve valud of `ValidationContext.MemberName` property: + +```xml + + + ... + + ... + + +``` + +### Affected APIs +`System.ComponentModel.DataAnnotations.ValidationContext.MemberName` + +### Category +ASP.NET + + + +