using FluentValidation;
using Indotalent.Shared.Consts;

namespace Indotalent.Features.Setting.AutoNumberSequence.Cqrs;

public class UpdateAutoNumberSequenceValidator : AbstractValidator<UpdateAutoNumberSequenceRequest>
{
    public UpdateAutoNumberSequenceValidator()
    {
        RuleFor(x => x.Id).NotEmpty().WithMessage("ID is required");
        RuleFor(x => x.PrefixTemplate).MaximumLength(GlobalConsts.StringLengthShort);
        RuleFor(x => x.SuffixTemplate).MaximumLength(GlobalConsts.StringLengthShort);
    }
}