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

namespace Knots.Validators.Role;

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