using FluentValidation;
using Indotalent.Shared.Consts;

namespace Indotalent.Features.Utilities.Todo.Cqrs;

public class CreateTodoValidator : AbstractValidator<CreateTodoRequest>
{
    public CreateTodoValidator()
    {
        RuleFor(x => x.Name)
            .NotEmpty().WithMessage("Name is required")
            .MaximumLength(GlobalConsts.StringLengthShort);
    }
}