以下是正在比较的两个属性:
[Required]
[Display(Name = "Current Password")]
public string Current { get; set; }
[Required]
[Compare("New")]
[Display(Name = "New Password")]
public string New { get; set; }
验证消息如下所示:
'Confirm Password' and 'New' do not match.
如何获取此属性以使用属性的显示名称New
?