29 references to AddModelError
Microsoft.AspNetCore.Identity.UI (26)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
222
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (2)
107
ModelState.
AddModelError
(string.Empty, ErrorMessage);
147
ModelState.
AddModelError
(string.Empty, "Invalid login attempt.");
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (1)
143
ModelState.
AddModelError
(string.Empty, "Invalid authenticator code.");
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (1)
126
ModelState.
AddModelError
(string.Empty, "Invalid recovery code entered.");
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (1)
131
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V4\Account\Manage\DeletePersonalData.cshtml.cs (1)
100
ModelState.
AddModelError
(string.Empty, "Incorrect password.");
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
138
ModelState.
AddModelError
("Input.Code", "Verification code is invalid.");
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (1)
119
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
162
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V4\Account\ResendEmailConfirmation.cshtml.cs (2)
82
ModelState.
AddModelError
(string.Empty, "Verification email sent. Please check your email.");
96
ModelState.
AddModelError
(string.Empty, "Verification email sent. Please check your email.");
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (1)
128
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
222
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (2)
107
ModelState.
AddModelError
(string.Empty, ErrorMessage);
147
ModelState.
AddModelError
(string.Empty, "Invalid login attempt.");
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (1)
143
ModelState.
AddModelError
(string.Empty, "Invalid authenticator code.");
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (1)
126
ModelState.
AddModelError
(string.Empty, "Invalid recovery code entered.");
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (1)
131
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V5\Account\Manage\DeletePersonalData.cshtml.cs (1)
100
ModelState.
AddModelError
(string.Empty, "Incorrect password.");
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
138
ModelState.
AddModelError
("Input.Code", "Verification code is invalid.");
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (1)
119
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
162
ModelState.
AddModelError
(string.Empty, error.Description);
Areas\Identity\Pages\V5\Account\ResendEmailConfirmation.cshtml.cs (2)
82
ModelState.
AddModelError
(string.Empty, "Verification email sent. Please check your email.");
96
ModelState.
AddModelError
(string.Empty, "Verification email sent. Please check your email.");
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (1)
128
ModelState.
AddModelError
(string.Empty, error.Description);
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\BodyModelBinder.cs (1)
180
bindingContext.ModelState.
AddModelError
(modelBindingKey, message);
ModelBinding\Binders\DictionaryModelBinder.cs (1)
174
bindingContext.ModelState.
AddModelError
(bindingContext.ModelName, ex.Message);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ModelStateDictionaryExtensions.cs (1)
34
modelState.
AddModelError
(GetExpressionText(expression), errorMessage);