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

21 lines
721 B

using Infrastructure.Application;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Application.Models
{
[Display(Name = "用户")]
public class EditUserModel : EditModel
{
[Required(ErrorMessage = nameof(RequiredAttribute))]
[RegularExpression("^[a-zA-Z0-9]+$", ErrorMessage = "")]
[StringLength(30, MinimumLength = 5, ErrorMessage = "用户名长度为5-30")]
[Display(Name = "用户名")]
public string UserName { get; set; }
[DataType("MultiSelectList")]
[Display(Name = "角色")]
public List<Guid> Roles { get; set; } = new List<Guid>();
}
}