Skip to content

ValidationAttribute documentation on MSDN does not correspond with documentation comments in source code #4566

Open
@IanKemp

Description

@IanKemp

https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validationattribute?view=netcore-3.1
vs
https://github.com/dotnet/runtime/blob/master/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationAttribute.cs

For example, the latter's doc comments for IsValid(object) state that "Derived classes should not override this method as it is only available for backwards compatibility." but this does not appear on MSDN.

Additionally, the code claims that NotImplementedException is thrown if IsValid(object, ValidationContext) has not been implemented by a derived class, which is obviously incorrect.

There are numerous other differences.

Please can the source and documentation be made consistent to reflect how ValidationAttribute should work and be used by developers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions