-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathRegisterModel.cs
More file actions
32 lines (25 loc) · 894 Bytes
/
RegisterModel.cs
File metadata and controls
32 lines (25 loc) · 894 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
using System.ComponentModel.DataAnnotations;
namespace SGFDevs.Models;
public class RegisterModel
{
[Required]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required]
[Display(Name = "Last Name")]
public string LastName { get; set; }
[Required]
[EmailAddress]
public string Email { get; set; }
[Required]
[RegularExpression("^[a-zA-Z0-9]*$", ErrorMessage = "Only alpha numeric characters allowed.")]
public string Username { get; set; }
[Required]
[DataType(DataType.Password)]
[RegularExpression(PasswordValidationRules.Pattern, ErrorMessage = PasswordValidationRules.ErrorMessage)]
public string Password { get; set; }
[Required]
[Display(Name = "Null Check")]
[RegularExpression("SGF|sgf", ErrorMessage = "Better luck next time.")]
public string ChallengeQuestion { get; set; }
}