32 writes to MinimumLength
BasicWebSite (1)
Models\Contact.cs (1)
13[StringLength(30, MinimumLength = 5)]
FormatterWebSite (2)
Controllers\JsonFormatterController.cs (1)
107[StringLength(8, MinimumLength = 2)]
Models\User.cs (1)
21[StringLength(15, MinimumLength = 3)]
Identity.ExternalClaims (6)
Pages\Account\LoginWith2fa.cshtml.cs (1)
38[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Pages\Account\Manage\ChangePassword.cshtml.cs (1)
47[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
49[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Pages\Account\Manage\SetPassword.cshtml.cs (1)
38[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Pages\Account\Register.cshtml.cs (1)
50[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Pages\Account\ResetPassword.cshtml.cs (1)
35[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
IdentitySample.DefaultUI (1)
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
49[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
IdentitySample.Mvc (4)
Models\AccountViewModels\RegisterViewModel.cs (1)
16[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
Models\AccountViewModels\ResetPasswordViewModel.cs (1)
15[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
Models\ManageViewModels\ChangePasswordViewModel.cs (1)
16[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
Models\ManageViewModels\SetPasswordViewModel.cs (1)
11[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
Microsoft.AspNetCore.Identity.UI (12)
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (1)
51[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (1)
52[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
66[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (1)
42[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
65[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (1)
47[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (1)
51[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (1)
52[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
66[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (1)
42[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
65[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (1)
47[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
ValidationAttributeUtil.cs (1)
21attr.MinimumLength = (int)minimumLength;
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
DataAnnotationsModelValidatorTest.cs (1)
480new StringLengthAttribute(length) { ErrorMessage = LocalizationKey, MinimumLength = 1},
StringLengthAttributeAdapterTest.cs (2)
85var attribute = new StringLengthAttribute(10) { MinimumLength = 3 }; 139var attribute = new StringLengthAttribute(10) { MinimumLength = 3 };
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
345[([StringLength(10, MinimumLength = 5)] string name) => {}, (OpenApiSchema schema) => { Assert.Equal(10, schema.MaxLength); Assert.Equal(5, schema.MinLength); }],
RazorPagesWebSite (1)
Pages\CustomModelTypeModel.cshtml.cs (1)
30[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
9 references to MinimumLength
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
StringLengthAttributeAdapter.cs (3)
20_min = Attribute.MinimumLength.ToString(CultureInfo.InvariantCulture); 36if (Attribute.MinimumLength != 0) 51Attribute.MinimumLength);
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
139schema[OpenApiSchemaKeywords.MinLengthKeyword] = stringLengthAttribute.MinimumLength;
System.ComponentModel.Annotations (5)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (5)
58return length >= MinimumLength && length <= MaximumLength; 71bool useErrorMessageWithMinimum = MinimumLength != 0 && !CustomErrorMessageSet; 78return string.Format(CultureInfo.CurrentCulture, errorMessage, name, MaximumLength, MinimumLength); 91if (MaximumLength < MinimumLength) 93throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, MaximumLength, MinimumLength));