namespace TaxBaik.Web.Endpoints.Faq;

using FluentValidation;

public sealed class CreateFaqRequestValidator : AbstractValidator<CreateFaqRequest>
{
    public CreateFaqRequestValidator()
    {
        RuleFor(x => x.Question).NotEmpty().MaximumLength(300);
        RuleFor(x => x.Answer).NotEmpty().MinimumLength(10).MaximumLength(5000);
        RuleFor(x => x.Category).MaximumLength(50);
    }
}

public sealed class UpdateFaqRequestValidator : AbstractValidator<UpdateFaqRequest>
{
    public UpdateFaqRequestValidator()
    {
        RuleFor(x => x.Question).NotEmpty().MaximumLength(300);
        RuleFor(x => x.Answer).NotEmpty().MinimumLength(10).MaximumLength(5000);
        RuleFor(x => x.Category).MaximumLength(50);
    }
}
