添加项目文件。
This commit is contained in:
20
TightWiki.Models/ViewModels/Shared/CredentialViewModel.cs
Normal file
20
TightWiki.Models/ViewModels/Shared/CredentialViewModel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Shared
|
||||
{
|
||||
public class CredentialViewModel
|
||||
{
|
||||
public const string NOTSET = "\\__!!_PASSWORD_NOT_SET_!!__//";
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Password")]
|
||||
[StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")]
|
||||
public string Password { get; set; } = NOTSET;
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Re-enter Password")]
|
||||
[StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")]
|
||||
[Compare("Password", ErrorMessage = "The two entered passwords do not match.")]
|
||||
public string ComparePassword { get; set; } = NOTSET;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user