22 writes to ErrorMessage
Microsoft.AspNetCore.Identity.UI (20)
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 (2)
52[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 63[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
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 (2)
42[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 53[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (2)
65[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 76[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (2)
47[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 57[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
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 (2)
52[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 63[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
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 (2)
42[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 53[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (2)
65[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 76[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (2)
47[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] 57[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
CompareAttributeAdapter.cs (1)
63ErrorMessage = attribute.ErrorMessage;
Shared.Tests (1)
Data.Validation\LengthAttributeTests.cs (1)
381[Length(5, ErrorMessage = "My custom message for '{0}'.")]
29 references to ErrorMessage
Microsoft.AspNetCore.Mvc.DataAnnotations (5)
CompareAttributeAdapter.cs (2)
59if (!string.IsNullOrEmpty(attribute.ErrorMessage) || 63ErrorMessage = attribute.ErrorMessage;
DataAnnotationsModelValidator.cs (1)
88!string.IsNullOrEmpty(Attribute.ErrorMessage) &&
ValidationAttributeAdapterOfTAttribute.cs (2)
70!string.IsNullOrEmpty(Attribute.ErrorMessage) && 74return _stringLocalizer[Attribute.ErrorMessage, arguments];
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
RemoteAttributeBase.cs (2)
196!string.IsNullOrEmpty(ErrorMessage) && 200return _stringLocalizer[ErrorMessage, displayName];
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
Microsoft.Extensions.Diagnostics.Probes (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
Microsoft.Extensions.Telemetry (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
Microsoft.Extensions.Validation.Localization (10)
DefaultValidationLocalizer.cs (1)
48lookupKey = context.Attribute.ErrorMessage;
ValidationLocalizationOptions.cs (9)
67/// every attribute and takes precedence over <see cref="ValidationAttribute.ErrorMessage"/>. 69/// <see cref="ValidationAttribute.ErrorMessage"/> directly as the lookup key. 74/// <see cref="ValidationAttribute.ErrorMessage"/> set are localized (using the 75/// <see cref="ValidationAttribute.ErrorMessage"/> value as the key); attributes without 76/// an explicit <see cref="ValidationAttribute.ErrorMessage"/> are not localized at all. 83/// <see cref="ValidationAttribute.ErrorMessage"/> (convention-based key selection).</item> 84/// <item>Transform an existing <see cref="ValidationAttribute.ErrorMessage"/> into a 87/// <see cref="ValidationAttribute.ErrorMessage"/> from the context.</item> 89/// behavior of using <see cref="ValidationAttribute.ErrorMessage"/> as the key.</item>
Shared (1)
Data.Validation\LengthAttribute.cs (1)
173if (!string.IsNullOrEmpty(ErrorMessage) || !string.IsNullOrEmpty(ErrorMessageResourceName))
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (6)
18/// a localized error message, but they cannot be set if <see cref="ErrorMessage" /> is also used to provide a 84/// This message will be used if the user has not set <see cref="ErrorMessage"/> 116/// Gets the localized error message string, coming either from <see cref="ErrorMessage" />, or from evaluating the 184/// that will provide a localized error message. Use <see cref="ErrorMessage" /> for non-localized error messages. 204/// Use <see cref="ErrorMessage" /> instead of this pair if error messages are not localized. 232string? localErrorMessage = ErrorMessage;