From 55f673cacc2973e2acab5fd83af9283442e685c5 Mon Sep 17 00:00:00 2001 From: Argo-Tianyi Date: Sat, 25 Dec 2021 16:40:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=BA=A6=E6=9D=9F=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/blazor/admin/BootstrapAdmin.DataAccess.Models/User.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/blazor/admin/BootstrapAdmin.DataAccess.Models/User.cs b/src/blazor/admin/BootstrapAdmin.DataAccess.Models/User.cs index 27707928..7fdfad86 100644 --- a/src/blazor/admin/BootstrapAdmin.DataAccess.Models/User.cs +++ b/src/blazor/admin/BootstrapAdmin.DataAccess.Models/User.cs @@ -47,6 +47,8 @@ namespace BootstrapAdmin.DataAccess.Models /// /// 获取/设置 密码 /// + [Display(Name = "密码")] + [Required(ErrorMessage = "{0}不可为空")] public string? Password { get; set; } /// @@ -87,6 +89,7 @@ namespace BootstrapAdmin.DataAccess.Models /// 获得/设置 新密码 /// [Display(Name = "新密码")] + [Required(ErrorMessage = "{0}不可为空")] [NotNull] public string? NewPassword { get; set; } @@ -94,6 +97,8 @@ namespace BootstrapAdmin.DataAccess.Models /// 获得/设置 新密码 /// [Display(Name = "确认密码")] + [Required(ErrorMessage = "{0}不可为空")] + [Compare("NewPassword", ErrorMessage = "{0}与{1}不一致")] [NotNull] public string? ConfirmPassword { get; set; }