1 type derived from CompareAttribute
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
CompareAttributeAdapter.cs (1)
48
private sealed class CompareAttributeWrapper :
CompareAttribute
28 instantiations of CompareAttribute
BasicWebSite (1)
Controllers\BindPropertiesWithValidationController.cs (1)
19
[
Compare
(nameof(Password), ErrorMessage = "Password and confirm password do not match.")]
Identity.ExternalClaims (4)
Pages\Account\Manage\ChangePassword.cshtml.cs (1)
54
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Pages\Account\Manage\SetPassword.cshtml.cs (1)
45
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Pages\Account\Register.cshtml.cs (1)
57
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Pages\Account\ResetPassword.cshtml.cs (1)
41
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
IdentitySample.DefaultUI (1)
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
56
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
IdentitySample.Mvc (4)
Models\AccountViewModels\RegisterViewModel.cs (1)
23
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Models\AccountViewModels\ResetPasswordViewModel.cs (1)
21
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Models\ManageViewModels\ChangePasswordViewModel.cs (1)
23
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Models\ManageViewModels\SetPasswordViewModel.cs (1)
18
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Microsoft.AspNetCore.Identity.UI (8)
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (1)
63
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (1)
53
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
76
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (1)
57
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (1)
63
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (1)
53
[
Compare
("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
76
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (1)
57
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Validation\DefaultObjectValidatorTests.cs (1)
1601
[
Compare
("Password")]
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
CompareAttributeAdapterTest.cs (6)
23
var attribute = new
CompareAttribute
("OtherProperty");
58
var attribute = new
CompareAttribute
("OtherProperty");
101
var attribute = new
CompareAttribute
("OtherProperty");
135
var attribute = new
CompareAttribute
("OtherProperty")
174
var attribute = new
CompareAttribute
("OtherProperty")
213
var attribute = new
CompareAttribute
("OtherProperty");
DataAnnotationsModelValidatorTest.cs (1)
466
new
CompareAttribute
(pattern) { ErrorMessage = LocalizationKey },
RazorPagesWebSite (2)
Pages\CustomModelTypeModel.cshtml.cs (1)
37
[
Compare
("Password", ErrorMessage = "The password and confirmation password do not match.")]
Pages\Validation\PageWithCompareValidation.cs (1)
21
[
Compare
(nameof(Password), ErrorMessage = "Password and confirm password do not match.")]
13 references to CompareAttribute
Microsoft.AspNetCore.Mvc.DataAnnotations (6)
CompareAttributeAdapter.cs (4)
12
internal sealed class CompareAttributeAdapter : AttributeAdapterBase<
CompareAttribute
>
16
public CompareAttributeAdapter(
CompareAttribute
attribute, IStringLocalizer? stringLocalizer)
52
public CompareAttributeWrapper(
CompareAttribute
attribute)
80
CompareAttribute
attribute)
ValidationAttributeAdapterProvider.cs (2)
38
else if (typeof(
CompareAttribute
).IsAssignableFrom(type))
40
return new CompareAttributeAdapter((
CompareAttribute
)attribute, stringLocalizer);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (6)
CompareAttributeAdapterTest.cs (6)
23
var
attribute = new CompareAttribute("OtherProperty");
58
var
attribute = new CompareAttribute("OtherProperty");
101
var
attribute = new CompareAttribute("OtherProperty");
135
var
attribute = new CompareAttribute("OtherProperty")
174
var
attribute = new CompareAttribute("OtherProperty")
213
var
attribute = new CompareAttribute("OtherProperty");
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
6
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.
CompareAttribute
))]