📜  razor 确认密码验证 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:22.740000             🧑  作者: Mango

代码示例1
public class RegisterViewModel
{
    [Required]
    public string Username { get; set; }

    [Required]
    public string Password { get; set; }

    [Compare("Password", ErrorMessage = "Confirm password doesn't match, Type again !")]
    public string ConfirmPassword { get; set; }
}