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/IoT.Shared/Application/Models/Users/ResetPasswordModel.cs

35 lines
1.2 KiB

using Infrastructure.Web.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
namespace IoT.Shared.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; }
[SelectList]
[Required(ErrorMessage = nameof(RequiredAttribute))]
[Display(Name = "验证方式")]
public string Type { get; set; }
[UIHint("CodeCaptcha")]
[CodeCaptcha]
[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; }
}
}