16 instantiations of MaxLengthAttribute
FormatterWebSite (2)
Models\Project.cs (2)
15[MaxLength(5)] 23[MaxLength(5)]
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (9)
DataAnnotationsModelValidatorTest.cs (3)
368var attribute = new MaxLengthAttribute(4); 457new MaxLengthAttribute(length) { ErrorMessage = LocalizationKey }, 461new MaxLengthAttribute(length) { ErrorMessage = LocalizationKey },
MaxLengthAttributeAdapterTest.cs (5)
23var attribute = new MaxLengthAttribute(10); 57var attribute = new MaxLengthAttribute(10); 88var attribute = new MaxLengthAttribute(5) { ErrorMessage = message }; 114var attribute = new MaxLengthAttribute(10); 146var attribute = new MaxLengthAttribute(10);
ValidationAttributeAdapterProviderTest.cs (1)
24new MaxLengthAttribute(),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
DefaultHtmlGeneratorTest.cs (2)
1071[MaxLength(MaxLengthAttributeValue)] 1079[MaxLength(MaxLengthAttributeValue)]
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiSchemaService\OpenApiComponentService.ParameterSchemas.cs (3)
314[([MaxLength(5)] string id) => {}, (OpenApiSchema schema) => Assert.Equal(5, schema.MaxLength)], 316[([MaxLength(5)] int[] ids) => {}, (OpenApiSchema schema) => Assert.Equal(5, schema.MaxItems)], 402[MaxLength(5)]
16 references to MaxLengthAttribute
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.DataAnnotations.Test (6)
DataAnnotationsModelValidatorTest.cs (1)
368var attribute = new MaxLengthAttribute(4);
MaxLengthAttributeAdapterTest.cs (5)
23var attribute = new MaxLengthAttribute(10); 57var attribute = new MaxLengthAttribute(10); 88var attribute = new MaxLengthAttribute(5) { ErrorMessage = message }; 114var attribute = new MaxLengthAttribute(10); 146var attribute = new MaxLengthAttribute(10);
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.AspNetCore.OpenApi (1)
Extensions\JsonObjectSchemaExtensions.cs (1)
92else if (attribute is MaxLengthAttribute maxLengthAttribute)
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))]