21 lines
705 B
C#
21 lines
705 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace ZelWiki.Models.ViewModels.Shared
|
|
{
|
|
public class CredentialViewModel
|
|
{
|
|
public const string NOTSET = "\\__!!_PASSWORD_NOT_SET_!!__//";
|
|
|
|
[Required]
|
|
[Display(Name = "密码")]
|
|
[StringLength(50, MinimumLength = 6, ErrorMessage = "密码必须大于6位")]
|
|
public string Password { get; set; } = NOTSET;
|
|
|
|
[Required]
|
|
[Display(Name = "再次输入密码")]
|
|
[StringLength(50, MinimumLength = 6, ErrorMessage = "密码必须大于6位")]
|
|
[Compare("Password", ErrorMessage = "两次密码输入不一致")]
|
|
public string ComparePassword { get; set; } = NOTSET;
|
|
}
|
|
}
|