Created
May 12, 2013 19:34
-
-
Save Maarten88/5564626 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.ComponentModel.DataAnnotations; | |
using System.Globalization; | |
using System.Web.Security; | |
namespace Auction.Web.Models | |
{ | |
using System.Web.Mvc; | |
public class RegisterModel | |
{ | |
[Key] | |
[ReadOnly(true)] | |
public Guid Id { get; set; } | |
[ReadOnly(true)] | |
[Display(Name = "Identity Provider")] | |
public string IdentityProvider; | |
[ReadOnly(true)] | |
[Display(Name = "Name Identifier")] | |
public string NameIdentifier { get; set; } | |
[Required] | |
[Display(Name = "Name")] | |
public string Name { get; set; } | |
[Required] | |
[DataType(DataType.EmailAddress)] | |
[Display(Name = "Email Address")] | |
[RegularExpression("^([a-zA-Z0-9_\\-\\.]+)@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$", ErrorMessage = "Email is not a valid e-mail address.")] | |
public string Email { get; set; } | |
[Required] | |
[Display(Name = "Allow cookies")] | |
public bool AllowCookies { get; set; } | |
[ReadOnly(true)] | |
public IEnumerable<ClaimModel> Claims { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment