ChangePasswordViewModel.cs 957 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.ManageViewModels
  7. {
  8. public class ChangePasswordViewModel
  9. {
  10. [Required]
  11. [DataType(DataType.Password)]
  12. [Display(Name = "Current password")]
  13. public string OldPassword { 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 = "New password")]
  18. public string NewPassword { get; set; }
  19. [DataType(DataType.Password)]
  20. [Display(Name = "Confirm new password")]
  21. [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
  22. public string ConfirmPassword { get; set; }
  23. }
  24. }