1

Making your own model and custom validation error messages was not too complicated for me to understand. It just requires you to know about data annotations. I copied the login page's login form to my homepage, since I want a user to login as soon as they enter the webapplication.

The thing is that the user is not supposed to read the validation messages in English, thus I want to change the validation text. How would I approach this? Could some please explain how to accomplish changing validation messages on a login form (preferably by making use of the default login method found in the accountcontroller and default login view)?

Priya
  • 1,359
  • 6
  • 21
  • 41
Barrosy
  • 1,407
  • 2
  • 25
  • 56
  • 2
    Possible duplicate of [How to localize ASP.NET Identity UserName and Password error messages?](http://stackoverflow.com/questions/19961648/how-to-localize-asp-net-identity-username-and-password-error-messages) – Clint B Jun 08 '16 at 12:19

1 Answers1

2

Since you want to change the error message to another language it would be best to create a new resource file and place all the translations there for your language. SO basically create a new resource file (they have resx extension Language.resx), place the resource keys into the file and replace the binder values to your new file DefaultModelBinder.ResourceClassKey = "Language";

Proxy
  • 1,118
  • 2
  • 10
  • 27