15 lines
388 B
C#
15 lines
388 B
C#
using Atomx.Common.Entities;
|
|
using FluentValidation;
|
|
using Microsoft.Extensions.Localization;
|
|
|
|
namespace Atomx.Admin.Client.Validators
|
|
{
|
|
public class RoleValidator : AbstractValidator<Role>
|
|
{
|
|
public RoleValidator(IStringLocalizer<RoleValidator> localizer)
|
|
{
|
|
RuleFor(p => p.Name).NotEmpty().WithMessage("角色名称不能为空");
|
|
}
|
|
}
|
|
}
|