1 write to MaximumLength
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (1)
23MaximumLength = maximumLength;
15 references to MaximumLength
Microsoft.AspNetCore.Components.Endpoints (2)
Forms\DataAnnotationsClientValidationProvider.cs (2)
130if (sla.MaximumLength != int.MaxValue) 132writer.Param("max"u8, sla.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)
162schema[OpenApiSchemaKeywords.MaxLengthKeyword] = stringLengthAttribute.MaximumLength;
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
461obj[MaxLengthStringPropertyName] ??= stringLengthAttribute.MaximumLength;
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (6)
59return length >= MinimumLength && length <= MaximumLength; 85/// <see cref="MaximumLength" />, and <c>{2}</c> is replaced with <see cref="MinimumLength" />. 89return string.Format(CultureInfo.CurrentCulture, format, name, MaximumLength, MinimumLength); 97if (MaximumLength < 0) 102if (MaximumLength < MinimumLength) 104throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, MaximumLength, MinimumLength));