14 lines
408 B
C#
14 lines
408 B
C#
using FluentValidation;
|
|
|
|
namespace TeleWave.Application.Admin.Users.CreateUser;
|
|
|
|
public sealed class CreateUserCommandValidator : AbstractValidator<CreateUserCommand>
|
|
{
|
|
public CreateUserCommandValidator()
|
|
{
|
|
RuleFor(x => x.UserName).NotEmpty().MinimumLength(3).MaximumLength(64);
|
|
RuleFor(x => x.Password).NotEmpty().MinimumLength(8);
|
|
RuleFor(x => x.RoleId).NotEmpty();
|
|
}
|
|
}
|