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
837 B
24 lines
837 B
using System.ComponentModel.DataAnnotations;
|
|
using Infrastructure.Web;
|
|
using Infrastructure.Web.DataAnnotations;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Application.Models
|
|
{
|
|
[Display(Name = "修改手机号")]
|
|
public class ChangePhoneNumberModel
|
|
{
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
[RegularExpression(@"^\d{11}$", ErrorMessage = "手机号格式错误")]
|
|
[DataType(DataType.PhoneNumber)]
|
|
[Display(Name = "手机号")]
|
|
[Remote("PhoneNumberNotUsed", "Account", ErrorMessage = "手机号已占用")]
|
|
public string PhoneNumber { get; set; }
|
|
|
|
[UIHint("CodeCaptcha")]
|
|
[CodeCaptchaAttribute]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
[Display(Name = "验证码")]
|
|
public string CodeCaptcha { get; set; }
|
|
}
|
|
} |