Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

vs2013+mvc5+asp.net Identity-This 密码 and 确认密码 do not match

$
0
0

I would finish a Register.cshtml, there is a password and confirmpassword. I need Chinese to finish confirmpassword, so I do like this in  AccountViewModels.cs:

[DataType(DataType.Password)]
[Display(Name = "确认密码")]
[Compare("Password", ErrorMessage = "输入的密码不一致.")]
public string ConfirmPassword { get; set; }
//确认密码 in English is ConfirmPassword.
//"输入的密码不一致." in english is "Password and ConfirmPassword do not match."

So,When running the Register.cshtml, if Password and ConfirmPassword do not match, the ErrorMessage should be: 输入的密码不一致. But , in fact, the ErrorMessage display with Chinese and English mixed, It's: This 密码 and 确认密码 do not match.

I don't know If I have myself clear. could anybody help me ?

Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>