dotnet / dotnet/dotnet-api-docs
MinLengthAttribute documentation should be split between .NET Framework and .NET Core
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
It seems the doc for MinLengthAttribute is off for .NET Core and .NET5+, because the implementation is different from the one in the Framework.
The Framework implementation can only be applied to strings and arrays :
https://github.com/microsoft/referencesource/blob/master/System.ComponentModel.DataAnnotations/DataAnnotations/MinLengthAttribute.cs#L55
but for the newest implementation since .NET Core, it applies to strings and ICollection as well :
https://github.com/dotnet/corefx/blob/7c3c88d490ae557241aa838695063415822dc692/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MinLengthAttribute.cs#L65
Contributor guide
Assessment
This issue has not been assessed yet.