38 instantiations of BindRequiredAttribute
ApiExplorerWebSite (2)
Controllers\ApiExplorerParametersController.cs (1)
37public void IsRequiredParameters([BindRequired] string requiredParam, string notRequiredParam, Product product)
Models\Product.cs (1)
11[BindRequired]
FormatterWebSite (5)
Controllers\TopLevelValidationController.cs (5)
15[BindProperty, BindRequired] public int BindRequiredProp { get; set; } 16[BindProperty, Required, BindRequired] public int RequiredAndBindRequiredProp { get; set; } 23[BindRequired] public int UnboundBindRequiredProp { get; set; } 32[BindRequired] int bindRequiredParam, 33[Required, BindRequired] int requiredAndBindRequiredParam,
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2440private void RequiredParameter([BindRequired, Required] string name)
Microsoft.AspNetCore.Mvc.Core.Test (14)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
1247[BindRequired] 1260[BindRequired]
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
1422[BindRequired] 1435[BindRequired]
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (6)
250new BindRequiredAttribute(), 365new BindRequiredAttribute(), 517new BindRequiredAttribute() 540new BindRequiredAttribute() 881[BindRequired] 887[BindRequired]
ModelBinding\Metadata\ModelAttributesTest.cs (2)
383[BindRequired] 410[BindRequired] BaseModel mergedAttributes)
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (2)
147var attributes = new object[] { new RequiredAttribute(), new CustomModelValidatorAttribute(), new BindRequiredAttribute(), }; 161var attributes = new object[] { new RequiredAttribute(), new BindRequiredAttribute(), };
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
ModelMetadataProviderTest.cs (1)
1028[BindRequired]
Microsoft.AspNetCore.Mvc.IntegrationTests (14)
ActionParametersIntegrationTest.cs (1)
951[BindRequired] int bindRequiredParam,
BindPropertyIntegrationTest.cs (2)
303[BindRequired] public int BindRequiredProp { get; set; } 310[BindRequired]
CollectionModelBinderIntegrationTest.cs (1)
282[BindRequired]
ComplexRecordIntegrationTest.cs (5)
1949private record Order10([BindRequired] Person10 Customer); 2056private record Person11(int Id, [BindRequired] string Name); 2224private record Order12([BindRequired] string ProductName); 2372private record Order13([BindRequired] List<int> OrderIds); 4107private record RecordTypeWithBindRequiredParameters([BindRequired] string Name, int Age);
ComplexTypeIntegrationTestBase.cs (4)
2098[BindRequired] 2216[BindRequired] 2388[BindRequired] 2540[BindRequired]
HeaderModelBinderIntegrationTest.cs (1)
22[BindRequired]
RazorPagesWebSite (1)
Pages\CustomModelTypeModel.cshtml.cs (1)
18[BindRequired]
7 references to BindRequiredAttribute
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\BindRequiredAttribute.cs (1)
17/// Initializes a new <see cref="BindRequiredAttribute"/> instance.
Microsoft.AspNetCore.Mvc.Core.Test (6)
ModelBinding\Metadata\ModelAttributesTest.cs (6)
234attribute => Assert.IsType<BindRequiredAttribute>(attribute), 236Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.ParameterAttributes)); 255attribute => Assert.IsType<BindRequiredAttribute>(attribute), 258Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.ParameterAttributes)); 279attribute => Assert.IsType<BindRequiredAttribute>(attribute), 282Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.PropertyAttributes));