34 references to ValidatorMetadata
Microsoft.AspNetCore.Mvc.Core (5)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
540_validatorMetadata = new ReadOnlyCollection<object>(ValidationMetadata.ValidatorMetadata);
ModelBinding\Metadata\DefaultValidationMetadataProvider.cs (2)
29if (!context.ValidationMetadata.ValidatorMetadata.Contains(attribute)) 31context.ValidationMetadata.ValidatorMetadata.Add(attribute);
ModelBinding\Metadata\HasValidatorsValidationMetadataProvider.cs (1)
37if (provider.HasValidators(context.Key.ModelType, context.ValidationMetadata.ValidatorMetadata))
ModelBinding\Validation\IMetadataBasedModelValidatorProvider.cs (1)
26/// <param name="validatorMetadata">The list of metadata items for validators. <seealso cref="ValidationMetadata.ValidatorMetadata"/>.</param>
Microsoft.AspNetCore.Mvc.Core.Test (7)
ModelBinding\Metadata\DefaultValidationMetadataProviderTest.cs (4)
123var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata); 142var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata); 156context.ValidationMetadata.ValidatorMetadata.Add(attribute); 162var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata);
ModelBinding\ParameterBinderTest.cs (3)
155d.ValidatorMetadata.Add(attribute); 162d.ValidatorMetadata.Add(attribute); 171d.ValidatorMetadata.Add(attribute);
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsMetadataProvider.cs (2)
384if (!context.ValidationMetadata.ValidatorMetadata.Contains(attribute)) 386context.ValidationMetadata.ValidatorMetadata.Add(attribute);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (20)
DataAnnotationsMetadataProviderTest.cs (20)
1164var attribute = Assert.Single(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1189var attribute = Assert.Single(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute a); 1219Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1240Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1259Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1278Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1299Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1319Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1338Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1357Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1376Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1397Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1418Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1439Assert.DoesNotContain(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1470Assert.Equal(expected, actual: context.ValidationMetadata.ValidatorMetadata); 1533var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata); 1548context.ValidationMetadata.ValidatorMetadata.Add(attribute); 1554var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata); 1569context.ValidationMetadata.ValidatorMetadata.Add(attribute); 1575var validatorMetadata = Assert.Single(context.ValidationMetadata.ValidatorMetadata);