using FluentValidation;
using Meezi.API.Models.Public;

namespace Meezi.API.Validators;

public class CoffeeAdvisorRequestValidator : AbstractValidator<CoffeeAdvisorRequest>
{
    public CoffeeAdvisorRequestValidator()
    {
        RuleFor(x => x.Purpose).NotEmpty().MinimumLength(3).MaximumLength(500);
        RuleFor(x => x.CafeSlug).MaximumLength(80).When(x => !string.IsNullOrEmpty(x.CafeSlug));
    }
}
