Add user creation functionality: implement API endpoint for creating new users, including request handling and response management. Update frontend to support user creation with a new form in the UsersPanel, integrating role selection and input validation. Enhance i18n for new user-related strings.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user