57 references to Range
BasicWebSite (1)
Models\Product.cs (1)
10[Range(10, 100)]
FormatterWebSite (7)
Controllers\JsonFormatterController.cs (1)
103[Range(1, 100)]
Controllers\TopLevelValidationController.cs (2)
18[BindProperty, Range(1, 100), DisplayName("Some Display Name For Prop")] public int OptionalRangeDisplayNameProp { get; set; } 35[Range(1, 100), Display(Name = "Some Display Name For Param")] int optionalRangeDisplayNameParam)
Models\Employee.cs (1)
10[Range(10, 100)]
Models\SimpleTypePropertiesModel.cs (2)
10[Range(2, 8)] 13[Range(2, 8)]
Models\User.cs (1)
13[Required, Range(1, 2000)]
HtmlGenerationWebSite (3)
Models\CustomerRecord.cs (1)
10[Range(1, 100)]
Models\Person.cs (1)
12[Range(1, 100)]
Models\Warehouse.cs (1)
17[Range(1, 100)]
IdentitySample.DefaultUI (2)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (1)
45[Range(0, 199, ErrorMessage = "Age must be between 0 and 199")]
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
65[Range(0, 199, ErrorMessage = "Age must be between 0 and 199 years")]
Microsoft.AspNetCore.Components.Forms.Tests (1)
EditContextDataAnnotationsExtensionsTest.cs (1)
187[Range(1, 100, ErrorMessage = "IntFrom1To100:range")] public int IntFrom1To100 { get; set; }
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingOptions.cs (1)
33[Range(0, int.MaxValue)]
Microsoft.AspNetCore.Mvc.Core.Test (11)
Controllers\ControllerBinderDelegateProviderTest.cs (1)
1066[Range(25, 50)]
ModelBinding\Metadata\ModelAttributesTest.cs (5)
308[Range(10, 100)] 327[Range(10, 100)] 340[Range(0, 10)] 389[Range(0, 10)] 409[Required, Range(1, 100)] int validationAttributes,
ModelBinding\ParameterBinderTest.cs (1)
230var validationAttribute = new RangeAttribute(1, 100);
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (2)
212[Range(0, 10)] 228[Range(0, 10)]
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
1593[Range(15, 25)] 1673[Range(-10, 400)]
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
ValidationAttributeUtil.cs (1)
35var attr = new RangeAttribute(min, max);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
DataAnnotationsModelValidatorTest.cs (1)
485new RangeAttribute(0, length) { ErrorMessage = LocalizationKey },
DefaultModelClientValidatorProviderTest.cs (2)
237[Range(0, 10)] 256[Range(0, 10)]
ValidationAttributeAdapterProviderTest.cs (1)
32new RangeAttribute(1, 100),
Microsoft.AspNetCore.Mvc.IntegrationTests (10)
DictionaryModelBinderIntegrationTest.cs (1)
465[Range(minimum: 0, maximum: 15, ErrorMessage = "You're out of range.")]
Models\Product.cs (1)
18[Range(0, 100)]
Models\ProductViewModel.cs (1)
16[Range(20, 100)]
Models\Software.cs (1)
15[Range(100, 200)]
ValidationIntegrationTests.cs (3)
26[Range(25, 50)] 1563[Range(0, 10)] 1710[Range(10000, 99999)]
ValidationWithRecordIntegrationTests.cs (3)
22private record TransferInfo([Range(25, 50)] int AccountId, double Amount); 1371[Range(0, 10)] 1516[Range(10000, 99999)]
Microsoft.AspNetCore.OpenApi.Tests (5)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (4)
342[([Range(4, 8)]int id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.Minimum); Assert.Equal(8, schema.Maximum); }], 373[([Range(4, 8)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.Minimum); Assert.Equal(8, schema.Maximum); }], 374[([Range(int.MinValue, int.MaxValue)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(int.MinValue, schema.Minimum); Assert.Equal(int.MaxValue, schema.Maximum); }], 405[([Range(1000, 2000)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(1000, schema.Minimum); Assert.Equal(2000, schema.Maximum); }]
Shared\SharedTypes.cs (1)
74[Range(1, 100)]
Microsoft.Extensions.Diagnostics.Probes (2)
TcpEndpointProbesOptions.cs (2)
27[Range(1, 65535)] 36[Range(1, 10000)]
Microsoft.Extensions.Http.Diagnostics (1)
Logging\LoggingOptions.cs (1)
59[Range(1, MaxIncomingBodySize)]
Microsoft.Extensions.Http.Resilience (2)
Routing\WeightedUriEndpoint.cs (1)
33[Range(MinWeight, MaxWeight)]
Routing\WeightedUriEndpointGroup.cs (1)
23[Range(MinWeight, MaxWeight)]
Microsoft.Extensions.Telemetry (1)
Logging\LoggerEnrichmentOptions.cs (1)
67[Range(MinDefinedStackTraceLength, MaxDefinedStackTraceLength)]
RazorPagesWebSite (2)
Models\UserModel.cs (1)
13[Range(0, 99)]
Pages\Validation\PageWithValidation.cs (1)
17[Range(18, 60, ErrorMessage = "18 ≤ Age ≤ 60")]
Sample (1)
src\OpenApi\test\Microsoft.AspNetCore.OpenApi.Tests\Shared\SharedTypes.cs (1)
74[Range(1, 100)]
TagHelpersWebSite (1)
Models\Employee.cs (1)
18[Range(10, 100)]
XmlFormattersWebSite (1)
Models\Employee.cs (1)
10[Range(10, 100)]