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

25 lines
852 B

using Infrastructure.Web.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using Platform.Controllers;
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(nameof(AccountController.EmailNotUsed), "Account", ErrorMessage = "邮箱已占用")]
public string Email { get; set; }
[UIHint("CodeCaptcha")]
[CodeCaptchaAttribute]
[Required(ErrorMessage = nameof(RequiredAttribute))]
[Display(Name = "验证码")]
public string CodeCaptcha { get; set; }
}
}