using FastEndpoints;
using FluentValidation;
using Knots.DTO.Role;

namespace Knots.Validators.Role;

public class CreateRoleDtoValidator : Validator<CreateRoleDto>
{
    public CreateRoleDtoValidator()
    {
        RuleFor(x => x.Libelle)
            .NotEmpty()
            .WithMessage("Libelle cannot be empty")
            .MaximumLength(50)
            .WithMessage("Libelle maximum length is 50");
    }
}