1 type derived from CompareAttribute
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
CompareAttributeAdapter.cs (1)
48private 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)
23var attribute = new CompareAttribute("OtherProperty"); 58var attribute = new CompareAttribute("OtherProperty"); 101var attribute = new CompareAttribute("OtherProperty"); 135var attribute = new CompareAttribute("OtherProperty") 174var attribute = new CompareAttribute("OtherProperty") 213var attribute = new CompareAttribute("OtherProperty");
DataAnnotationsModelValidatorTest.cs (1)
466new 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)
12internal sealed class CompareAttributeAdapter : AttributeAdapterBase<CompareAttribute> 16public CompareAttributeAdapter(CompareAttribute attribute, IStringLocalizer? stringLocalizer) 52public CompareAttributeWrapper(CompareAttribute attribute) 80CompareAttribute attribute)
ValidationAttributeAdapterProvider.cs (2)
38else if (typeof(CompareAttribute).IsAssignableFrom(type)) 40return new CompareAttributeAdapter((CompareAttribute)attribute, stringLocalizer);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (6)
CompareAttributeAdapterTest.cs (6)
23var attribute = new CompareAttribute("OtherProperty"); 58var attribute = new CompareAttribute("OtherProperty"); 101var attribute = new CompareAttribute("OtherProperty"); 135var attribute = new CompareAttribute("OtherProperty") 174var attribute = new CompareAttribute("OtherProperty") 213var attribute = new CompareAttribute("OtherProperty");
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.CompareAttribute))]