45 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.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 (1)
Services\OpenApiSchemaService\OpenApiComponentService.ParameterSchemas.cs (1)
319[([Range(4, 8)]int id) => {}, (OpenApiSchema schema) => { Assert.Equal(4, schema.Minimum); Assert.Equal(8, schema.Maximum); }],
RazorPagesWebSite (2)
Models\UserModel.cs (1)
13[Range(0, 99)]
Pages\Validation\PageWithValidation.cs (1)
17[Range(18, 60, ErrorMessage = "18 ≤ Age ≤ 60")]
TagHelpersWebSite (1)
Models\Employee.cs (1)
18[Range(10, 100)]
XmlFormattersWebSite (1)
Models\Employee.cs (1)
10[Range(10, 100)]