dotnet / dotnet/dotnet-api-docs
ValidationAttribute documentation on MSDN does not correspond with documentation comments in source code
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.