forked from smartbooks/QuickBootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserCreateRequest.cs
More file actions
36 lines (31 loc) · 1014 Bytes
/
UserCreateRequest.cs
File metadata and controls
36 lines (31 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.ComponentModel.DataAnnotations;
namespace QuickBootstrap.Models
{
public class UserCreateRequest
{
public UserCreateRequest()
{
UserName = string.Empty;
Password = string.Empty;
}
[MaxLength(50)]
[Required]
[DataType(DataType.EmailAddress)]
[RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9._]+\.[A-Za-z]{2,4}", ErrorMessage = "电邮邮件格式不正确")]
[Display(Name = "邮箱地址")]
public string UserName { get; set; }
[MinLength(6)]
[MaxLength(12)]
[Required]
[DataType(DataType.Password)]
[Display(Name = "登录密码")]
public string Password { get; set; }
[MaxLength(50)]
[Required]
[Display(Name = "真实姓名")]
public string Nick { get; set; }
[Required]
[Display(Name = "账号状态")]
public bool IsEnable { get; set; }
}
}