Source

main / Source / WebClient / Web.Client / ViewModel / Registration.cs

using System.ComponentModel.DataAnnotations;

namespace DataUp.Web.Client.ViewModel
{
    public class RegistrationViewModel
    {
        public int UserID { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Name Identifier is required.")]
        [Display(Name = "Name Identifier")]
        [DataType(DataType.Text)]
        public string NameIdentifier { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Identity Provider is required.")]
        [Display(Name = "Identity Provider")]
        [DataType(DataType.Text)]
        public string IdentityProvider { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "First Name is required.")]
        [Display(Name = "First Name")]
        [DataType(DataType.Text)]
        [RegularExpression(@"^[ a-zA-Z0-9_*@!,.-]*$", ErrorMessage = "Name should not contain special characters")]
        public string FirstName { get; set; }

        [Display(Name = "Middle Name")]
        [DataType(DataType.Text)]
        [RegularExpression(@"^[ a-zA-Z0-9_*@!,.-]*$", ErrorMessage = "Name should not contain special characters")]
        public string MiddleName { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Last Name is required.")]
        [Display(Name = "Last Name")]
        [DataType(DataType.Text)]
        [RegularExpression(@"^[ a-zA-Z0-9_*@!,.-]*$", ErrorMessage = "Name should not contain special characters")]
        public string LastName { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Organization is required.")]
        [Display(Name = "Organization")]
        [DataType(DataType.Text)]
        public string Organization { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Email Id is required.")]
        [Display(Name = "Email")]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?", ErrorMessage = "Please re-enter a valid email address")]
        public string EmailId { get; set; }

        public string UrlReferrer { get; set; }
    }
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.