Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public class RegisterViewModel
  2. {
  3. [Required]
  4. [StringLength(20, ErrorMessage = "The {0} must be between {2} and {1} characters long.", MinimumLength = 5)]
  5. [RegularExpression("^([a-zA-Z0-9]{5,20})$", ErrorMessage = "The {0} must contain only alphanumeric characters")]
  6. [Display(Name = "Username")]
  7. public string RegisterUsername { get; set; }
  8.  
  9. [Required]
  10. [Display(Name = "Email")]
  11. public string RegisterEmail { get; set; }
  12.  
  13. [Required]
  14. [StringLength(20, ErrorMessage = "The {0} must be between {2} and {1} characters long.", MinimumLength = 8)]
  15. [DataType(DataType.Password)]
  16. [Display(Name = "Password")]
  17. public string RegisterPassword { get; set; }
  18.  
  19. [DataType(DataType.Password)]
  20. [Display(Name = "Confirm password")]
  21. [Compare("RegisterPassword", ErrorMessage = "The password and confirmation password do not match.")]
  22. public string ConfirmPassword { get; set; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement