Using MVC Core with ASP.NET Identity I would like to change the defaults error messages of ValidationSummary that arrived from Register action. Any advice will be much appreciated.
相关问题
- MVC-Routing,Why i can not ignore defaults,The matc
- parameters in routing do not work MVC 3
- Can I use MvcJsonOptions configured during Startup
- Singleton with AsyncLocal vs Scope Service
- gRPC client do not dispose Channel
相关文章
- How to get a list of connected clients on SignalR
- How do you redirect to the calling page in ASP.NET
- Change color of bars depending on value in Highcha
- The program '[4432] iisexpress.exe' has ex
- EF Core 'another instance is already being tra
- ASP.Net MVC 4 Bundles
- How to get server path of physical path ?
- Re-target .NET Core to net471, net 472
You should override methods of
IdentityErrorDescriber
to change identity error messages.In
Startup.cs
setIdentityErrorDescriber
The answer is from https://stackoverflow.com/a/38199890/5426333
You can use DataAnnotations in your RegisterViewModel class. In fact if you scaffold your application with authentication, you will get something like this:
Obviously, you can change
ErrorMessage
to anything you want it to be!