RegisterViewModel.cs 902 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace Winsoft.GOV.XF.WXCore.Models.AccountViewModels
  7. {
  8. public class RegisterViewModel
  9. {
  10. [Required]
  11. [EmailAddress]
  12. [Display(Name = "Email")]
  13. public string Email { get; set; }
  14. [Required]
  15. [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
  16. [DataType(DataType.Password)]
  17. [Display(Name = "Password")]
  18. public string Password { get; set; }
  19. [DataType(DataType.Password)]
  20. [Display(Name = "Confirm password")]
  21. [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
  22. public string ConfirmPassword { get; set; }
  23. }
  24. }