using FluentValidation;

namespace TeleWave.Application.Library.Genres.CreateGenre;

public sealed class CreateGenreCommandValidator : AbstractValidator<CreateGenreCommand>
{
    public CreateGenreCommandValidator()
    {
        RuleFor(x => x.Name).NotEmpty().MaximumLength(128);
        RuleFor(x => x.Slug).NotEmpty().MaximumLength(64);
        RuleForEach(x => x.Aliases).NotEmpty().MaximumLength(128);
    }
}
