5 instantiations of MaxLengthAttribute
Aspire.Dashboard (1)
Model\Otlp\FilterDialogFormModel.cs (1)
20[MaxLength(1024, ErrorMessageResourceType = typeof(Dialogs), ErrorMessageResourceName = nameof(Dialogs.FieldTooLong))]
Microsoft.Extensions.AI.Abstractions.Tests (3)
Utilities\AIJsonUtilitiesTests.cs (3)
1095[MaxLength(50)] 1101[MaxLength(8)] 1155[MaxLength(24)]
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
563[MaxLength(10)]
13 references to MaxLengthAttribute
Microsoft.AspNetCore.Components.Forms (1)
ClientValidation\DefaultClientValidationService.cs (1)
90case MaxLengthAttribute maxla:
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
MaxLengthAttributeAdapter.cs (2)
11internal sealed class MaxLengthAttributeAdapter : AttributeAdapterBase<MaxLengthAttribute> 15public MaxLengthAttributeAdapter(MaxLengthAttribute attribute, IStringLocalizer? stringLocalizer)
ValidationAttributeAdapterProvider.cs (2)
30else if (typeof(MaxLengthAttribute).IsAssignableFrom(type)) 32return new MaxLengthAttributeAdapter((MaxLengthAttribute)attribute, stringLocalizer);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
84/// <see cref="StringLengthAttribute"/> or <see cref="MaxLengthAttribute"/> attributes. 1341if (attribute is MaxLengthAttribute maxLengthAttribute && (!maxLengthValue.HasValue || maxLengthValue.Value > maxLengthAttribute.Length))
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
470if (ResolveAttribute<MaxLengthAttribute>() is { } maxLengthAttribute)
Microsoft.Extensions.Validation.Localization (2)
BuiltInFormatters.cs (1)
27internal sealed class MaxLengthAttributeFormatter(MaxLengthAttribute attribute) : IValidationAttributeFormatter
ValidationAttributeFormatterRegistry.cs (1)
67AddFormatter<MaxLengthAttribute>(a => new MaxLengthAttributeFormatter(a));
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (2)
22/// Initializes a new instance of the <see cref="MaxLengthAttribute" /> class. 36/// Initializes a new instance of the <see cref="MaxLengthAttribute" /> class.
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
22[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.MaxLengthAttribute))]