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/ChangeEmailModel.cs

24 lines
800 B

using Infrastructure.Web.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
namespace IoT.Shared.Application.Models
{
[Display(Name = "修改邮箱")]
public class ChangeEmailModel
{
[Required(ErrorMessage = nameof(RequiredAttribute))]
[DataType(DataType.EmailAddress)]
[RegularExpression(@"^\w+@\w+\.\w+$", ErrorMessage = "邮箱格式错误")]
[Display(Name = "邮箱")]
[Remote("EmailNotUsed", "Account", ErrorMessage = "邮箱已占用")]
public string Email { get; set; }
[UIHint("CodeCaptcha")]
[CodeCaptchaAttribute]
[Required(ErrorMessage = nameof(RequiredAttribute))]
[Display(Name = "验证码")]
public string CodeCaptcha { get; set; }
}
}