1 write to MaximumLength
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (1)
22MaximumLength = maximumLength;
11 references to MaximumLength
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
StringLengthAttributeAdapter.cs (3)
19_max = Attribute.MaximumLength.ToString(CultureInfo.InvariantCulture); 31if (Attribute.MaximumLength != int.MaxValue) 50Attribute.MaximumLength,
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
1345else if (attribute is StringLengthAttribute stringLengthAttribute && (!maxLengthValue.HasValue || maxLengthValue.Value > stringLengthAttribute.MaximumLength)) 1347maxLengthValue = stringLengthAttribute.MaximumLength;
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
140schema[OpenApiSchemaKeywords.MaxLengthKeyword] = stringLengthAttribute.MaximumLength;
System.ComponentModel.Annotations (5)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (5)
58return length >= MinimumLength && length <= MaximumLength; 78return string.Format(CultureInfo.CurrentCulture, errorMessage, name, MaximumLength, MinimumLength); 86if (MaximumLength < 0) 91if (MaximumLength < MinimumLength) 93throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, MaximumLength, MinimumLength));