System.ComponentModel.DataAnnotations.MaxLengthAttribute
Specifies the maximum length of array or string data allowed in a property.
namespace System.ComponentModel.DataAnnotations
{
public class MaxLengthAttribute : ValidationAttribute
{
public int Length { get; }
public MaxLengthAttribute(int length);
public MaxLengthAttribute();
}
}