You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/UserCenter/Application/Models/ResetPasswordModel.cs

35 lines
1.2 KiB

using System.ComponentModel.DataAnnotations;
using Infrastructure.Web;
using Infrastructure.Web.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
namespace Application.Models
{
[Display(Name = "重设密码")]
public class ResetPasswordModel
{
public const string Key = nameof(ResetPasswordModel);
[Display(Name = "用户名")]
[Remote("HasUser", "Account", ErrorMessage = "用户名不存在")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public string UserName { get; set; }
[UIHint("SelectList")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
[Display(Name = "验证方式")]
public string Type { get; set; }
[UIHint("CodeCaptcha")]
[CodeCaptchaAttribute]
[Required(ErrorMessage = nameof(RequiredAttribute))]
[Display(Name = "验证码")]
public string CodeCaptcha { get; set; }
[Required(ErrorMessage = nameof(RequiredAttribute))]
[StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度范围为{2}-{1}")]
[DataType(DataType.Password)]
[Display(Name = "新密码")]
public string NewPassword { get; set; }
}
}