ChangePasswordView.cs 931 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Web.Mvc;
  7. using System.ComponentModel;
  8. namespace EMIS.ViewModel.SystemView
  9. {
  10. public class ChangePasswordView
  11. {
  12. [Required(ErrorMessage = "请输入原密码")]
  13. [DataType(DataType.Password)]
  14. [DisplayName("原密码")]
  15. public string OldPassword { get; set; }
  16. [Required]
  17. [DataType(DataType.Password)]
  18. [RegularExpression("^(?=.*?[0-9])(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[#?!@$%^&*-]).{8,}$", ErrorMessage = "密码须包含大小写英文、特殊字符、数字且长度大于或等于8位")]
  19. [DisplayName("新密码")]
  20. public string Password { get; set; }
  21. [Required]
  22. [DataType(DataType.Password)]
  23. [DisplayName("确认新密码")]
  24. public string PasswordRep { get; set; }
  25. }
  26. }