From cb2cff4681c00cdbf805d1ad1a99baf1e39a4059 Mon Sep 17 00:00:00 2001 From: Hong Li Date: Mon, 11 Mar 2019 18:58:38 -0700 Subject: [PATCH] compat doc for bug#563497 --- ...ionContext.MemberName is null sometimes.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/compatibility/aspnet-ASP.NET ValidationContext.MemberName is null sometimes.md 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 + + + +