dotnet / dotnet/dotnet-api-docs

MinLengthAttribute documentation should be split between .NET Framework and .NET Core

Open
#7,386 1 comment 0 reactions 0 assignees View on GitHub
area-System.ComponentModel.DataAnnotations Pri3 untriaged
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.