using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Mvc; using System.Text.RegularExpressions; namespace CertAuth.Domain { public class CollectorsLst { [Key] public int Id { get; set; } [Display(Name = "Associated User")] public string UserKey { get; set; } [Required] [Display(Name = "First Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 1; Maximum 50", MinimumLength = 2)] public string CollectorFirstName { get; set; } [Required] [Display(Name = "Last Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 1; Maximum 50", MinimumLength = 2)] public string CollectorLastName { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "Address 1")] public string CollectorAddress1 { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "Address 2")] public string CollectorAddress2 { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "City")] public string CollectorCity { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "Postal Code")] public string CollectorPostalCode { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "State / Prov.")] public string CollectorProvince { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Maximum 50")] [Display(Name = "Country")] public string CollectorCountry { get; set; } [StringLength(maximumLength: 50, ErrorMessage = "Field Length:Maximum 50")] [Display(Name = "Email")] [DataType(DataType.EmailAddress)] public string EmailAddress { get; set; } [Phone] [StringLength(maximumLength: 10, ErrorMessage = "Field Length: Maximum 10")] [Display(Name = "Phone")] [RegularExpression(@"^(\+\s?)?((?