Skip to content

Several errors in ValidationException(String, Exception) constructor #12692

@mattflaschen

Description

@mattflaschen

Type of issue

Outdated article

Description

ValidationException(String, Exception) has a few errors:

  1. 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).

  2. 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).

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions