System.ComponentModel.DataAnnotations.StringLengthAttribute public class StringLengthAttribute : ValidationAttribute Documentation Code public int MaximumLength { get; } public int MinimumLength { get; set; } public StringLengthAttribute(int maximumLength)