3 instantiations of StringLengthAttribute
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
414AIFunction func = AIFunctionFactory.Create(([Range(1, 10)] int num, [StringLength(100, MinimumLength = 1)] string str) => num + str.Length, serializerOptions: options); 1089[StringLength(100, MinimumLength = 10)]
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
549[StringLength(42)]
12 references to StringLengthAttribute
Microsoft.AspNetCore.Components.Forms (1)
ClientValidation\DefaultClientValidationService.cs (1)
78case StringLengthAttribute sla:
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
StringLengthAttributeAdapter.cs (2)
11internal sealed class StringLengthAttributeAdapter : AttributeAdapterBase<StringLengthAttribute> 16public StringLengthAttributeAdapter(StringLengthAttribute attribute, IStringLocalizer? stringLocalizer)
ValidationAttributeAdapterProvider.cs (2)
50else if (typeof(StringLengthAttribute).IsAssignableFrom(type)) 52return new StringLengthAttributeAdapter((StringLengthAttribute)attribute, stringLocalizer);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
84/// <see cref="StringLengthAttribute"/> or <see cref="MaxLengthAttribute"/> attributes. 1345else if (attribute is StringLengthAttribute stringLengthAttribute && (!maxLengthValue.HasValue || maxLengthValue.Value > stringLengthAttribute.MaximumLength))
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
443if (ResolveAttribute<StringLengthAttribute>() is { } stringLengthAttribute)
Microsoft.Extensions.Validation.Localization (3)
BuiltInFormatters.cs (1)
51internal sealed class StringLengthAttributeFormatter(StringLengthAttribute attribute) : IValidationAttributeFormatter
ValidationAttributeFormatterRegistry.cs (2)
40/// <see cref="MinLengthAttribute"/>, <see cref="StringLengthAttribute"/>, etc.) are registered 69AddFormatter<StringLengthAttribute>(a => new StringLengthAttributeFormatter(a));
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
38[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.StringLengthAttribute))]