using System.ComponentModel.DataAnnotations; namespace TIAMSharedUI.Pages.Components { public class TestUserData { [Required(ErrorMessage = "The Username value should be specified.")] [DataType(DataType.Text)] [Display(Name = "User Name")] public string Username { get; set; } [Required(ErrorMessage = "The Password value should be specified.")] [MinPasswordLength(6, "The Password must be at least 6 characters long.")] [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } [Required(ErrorMessage = "The Email value should be specified.")] [Email(ErrorMessage = "The Email value is invalid.")] [DataType(DataType.Text)] [Display(Name = "Email Address")] public string Email { get; set; } [Required(ErrorMessage = "The Phone value should be specified.")] [DataType(DataType.PhoneNumber)] [Display(Name = "Phone Number")] public string Phone { get; set; } [DataType(DataType.Date)] [Display(Name = "Birth Date")] public DateTime BirthDate { get; set; } = new DateTime(1970, 1, 1); [DataType("ComboBox")] [Display(Name = "Occupation")] public string Occupation { get; set; } [DataType(DataType.MultilineText)] [Display(Name = "Notes")] public string Notes { get; set; } } public class AdditionalData { public static IEnumerable Occupations { get; set; } = new List() { "Academic", "Administrative", "Art/Entertainment", "College Student", "Community & Social", "Computers", "Education", "Engineering", "Financial Services", "Government", "High School Student", "Law", "Managerial", "Manufacturing", "Medical/Health", "Military", "Non-government Organization", "Other Services", "Professional", "Retail", "Science & Research", "Sports", "Technical", "University Student", "Web Building", }; } }