Type of issue
Outdated article
Description
ValidationException(String, Exception) has a few errors:
-
The description says, "Initializes a new instance of the ValidationException class using a specified error message and a collection of inner exception instances.". Instead of "a collection of inner exception instances", it should say "an inner exception", matching the signature (a single Exception).
-
Similarly, the parameter is documented as "The collection of validation exceptions", but should say "the Exception that caused this exception" (the signature is Exception, not ValidationException and not a collection).
-
The Remarks say, "You typically will not use this constructor because validation exceptions are stored in the InnerExceptions property, not innerException." The InnerExceptions link goes to System.Web.DynamicData.IDynamicValidatorException. That namespace does not exist at all in .NET Core. The Remarks should be removed entirely.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validationexception.-ctor?view=net-8.0
Content source URL
https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.ComponentModel.DataAnnotations/ValidationException.xml
Document Version Independent Id
3835e2b6-232f-3985-766f-4fdc001d58a3
Platform Id
22bc142f-01a3-6a20-8996-a8d75c704306
Article author
@dotnet-bot
Type of issue
Outdated article
Description
ValidationException(String, Exception) has a few errors:
The description says, "Initializes a new instance of the ValidationException class using a specified error message and a collection of inner exception instances.". Instead of "a collection of inner exception instances", it should say "an inner exception", matching the signature (a single Exception).
Similarly, the parameter is documented as "The collection of validation exceptions", but should say "the Exception that caused this exception" (the signature is Exception, not ValidationException and not a collection).
The Remarks say, "You typically will not use this constructor because validation exceptions are stored in the InnerExceptions property, not innerException." The InnerExceptions link goes to System.Web.DynamicData.IDynamicValidatorException. That namespace does not exist at all in .NET Core. The Remarks should be removed entirely.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validationexception.-ctor?view=net-8.0
Content source URL
https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.ComponentModel.DataAnnotations/ValidationException.xml
Document Version Independent Id
3835e2b6-232f-3985-766f-4fdc001d58a3
Platform Id
22bc142f-01a3-6a20-8996-a8d75c704306
Article author
@dotnet-bot