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.
24 lines
814 B
24 lines
814 B
using System.ComponentModel.DataAnnotations;
|
|
using Infrastructure.Web;
|
|
using Infrastructure.Web.DataAnnotations;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace 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; }
|
|
}
|
|
} |