Skip to content

Instantly share code, notes, and snippets.

@Maarten88
Created May 12, 2013 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maarten88/5564626 to your computer and use it in GitHub Desktop.
Save Maarten88/5564626 to your computer and use it in GitHub Desktop.
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