using FluentValidation;

namespace Indotalent.Features.Sales.CreditNote.Cqrs;

public class CreateCreditNoteValidator : AbstractValidator<CreateCreditNoteRequest>
{
    public CreateCreditNoteValidator()
    {
        RuleFor(x => x.CreditNoteDate).NotEmpty().WithMessage("Date is required");
        RuleFor(x => x.SalesReturnId).NotEmpty().WithMessage("Sales Return reference is required");
    }
}