1- start Visual studio 2013
2- create a project using the default MVC template that Microsoft provides.
3- Run the app and go to http://localhost:2618/Account/Register
4- enter an email address in the form
5- in the password fields enter: 12345678
6- Press Register
button
You will see an this error message after form-post-back:
Passwords must have at least one non letter or digit character. Passwords must have at least one lowercase ('a'-'z'). Passwords must have at least one uppercase ('A'-'Z').
Where and how can I customize this message? I tried using data annotations but couldn't find a solution for it. Please give me specific details. I couldn't find an answer after a lot of searching for it even in the stackoverflow.
Thanks
******************** Note ************
The error message is different than the one which is available in AccountViewModels.cs file for the password field:
public class RegisterViewModel
{
[Required]
[EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
}