4 overrides of ValidatorMetadata
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcModelMetadata.cs (1)
53public override IReadOnlyList<object> ValidatorMetadata { get; }
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
740public override IReadOnlyList<object> ValidatorMetadata
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
53public override IReadOnlyList<object> ValidatorMetadata { get; } = Array.Empty<object>();
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
534public override IReadOnlyList<object> ValidatorMetadata
37 references to ValidatorMetadata
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\Validation\ClientValidatorProviderContext.cs (2)
32/// This property provides convenience access to <see cref="ModelMetadata.ValidatorMetadata"/>. 34public IReadOnlyList<object> ValidatorMetadata => ModelMetadata.ValidatorMetadata;
ModelBinding\Validation\ModelValidatorProviderContext.cs (2)
31/// This property provides convenience access to <see cref="ModelMetadata.ValidatorMetadata"/>. 33public IReadOnlyList<object> ValidatorMetadata => ModelMetadata.ValidatorMetadata;
Microsoft.AspNetCore.Mvc.Core (8)
ModelBinding\Validation\ClientValidatorCache.cs (3)
41var items = new List<ClientValidatorItem>(metadata.ValidatorMetadata.Count); 42for (var i = 0; i < metadata.ValidatorMetadata.Count; i++) 44items.Add(new ClientValidatorItem(metadata.ValidatorMetadata[i]));
ModelBinding\Validation\DefaultModelValidatorProvider.cs (1)
13/// instances in <see cref="ModelBinding.ModelMetadata.ValidatorMetadata"/>.
ModelBinding\Validation\IMetadataBasedModelValidatorProvider.cs (1)
12/// exclusively using values in <see cref="ModelMetadata.ValidatorMetadata"/> or the model type.
ModelBinding\Validation\ValidatorCache.cs (3)
31var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count); 32for (var i = 0; i < metadata.ValidatorMetadata.Count; i++) 34items.Add(new ValidatorItem(metadata.ValidatorMetadata[i]));
Microsoft.AspNetCore.Mvc.Core.Test (15)
ModelBinding\ParameterBinderTest.cs (2)
93mockModelMetadata.Setup(o => o.ValidatorMetadata).Returns(new[] 232mockModelMetadata.Setup(o => o.ValidatorMetadata).Returns(new[] {
ModelBinding\Validation\ClientValidatorCacheTest.cs (8)
25Assert.Contains(attribute1, metadata.ValidatorMetadata); // Copied by provider 26Assert.Contains(attribute2, metadata.ValidatorMetadata); // Copied by provider 52Assert.Contains(validator1.Attribute, metadata.ValidatorMetadata); // Copied by provider 53Assert.Contains(validator2.Attribute, metadata.ValidatorMetadata); // Copied by provider 82Assert.Contains(validator1.Attribute, parameter.ValidatorMetadata); // Copied by provider 83Assert.Contains(validator2.Attribute, parameter.ValidatorMetadata); // Copied by provider 102Assert.Contains(validator1.Attribute, property.ValidatorMetadata); // Copied by provider 103Assert.Contains(validator2.Attribute, property.ValidatorMetadata); // Copied by provider
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (1)
172return metadata.ValidatorMetadata.Select(v => new ValidatorItem(v)).ToList();
ModelBinding\Validation\ValidatorCacheTest.cs (4)
25Assert.Contains(attribute1, metadata.ValidatorMetadata); // Copied by provider 26Assert.Contains(attribute2, metadata.ValidatorMetadata); // Copied by provider 52Assert.Contains(validator1.Attribute, metadata.ValidatorMetadata); // Copied by provider 53Assert.Contains(validator2.Attribute, metadata.ValidatorMetadata); // Copied by provider
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DefaultClientModelValidatorProvider.cs (1)
13/// <see cref="IClientModelValidator"/> instances in <see cref="ModelBinding.ModelMetadata.ValidatorMetadata"/>.
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
DataAnnotationsClientModelValidatorProviderTest.cs (1)
137return metadata.ValidatorMetadata.Select(v => new ClientValidatorItem(v)).ToList();
DataAnnotationsModelValidatorProviderTest.cs (3)
162var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count); 163for (var i = 0; i < metadata.ValidatorMetadata.Count; i++) 165items.Add(new ValidatorItem(metadata.ValidatorMetadata[i]));
DataTypeClientModelValidatorProviderTest.cs (1)
85return metadata.ValidatorMetadata.Select(v => new ClientValidatorItem(v)).ToList();
DefaultModelClientValidatorProviderTest.cs (2)
192return metadata.ValidatorMetadata.Select(v => new ClientValidatorItem(v)).ToList(); 197return metadata.ValidatorMetadata.Select(v => new ValidatorItem(v)).ToList();
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
DefaultHtmlGenerator.cs (1)
1339foreach (var attribute in modelExplorer.Metadata.ValidatorMetadata)
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
306if (parameterDescription.ModelMetadata is { PropertyName: { }, ContainerType: { }, HasValidators: true, ValidatorMetadata: { } validations })