12 lines
376 B
C#
12 lines
376 B
C#
using FluentValidation;
|
|
|
|
namespace Indotalent.Features.Sales.Invoice.Cqrs;
|
|
|
|
public class CreateInvoiceValidator : AbstractValidator<CreateInvoiceRequest>
|
|
{
|
|
public CreateInvoiceValidator()
|
|
{
|
|
RuleFor(x => x.InvoiceDate).NotEmpty().WithMessage("Date is required");
|
|
RuleFor(x => x.SalesOrderId).NotEmpty().WithMessage("Sales Order is required");
|
|
}
|
|
} |