initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Indotalent.Features.Sales.PaymentReceive.Cqrs;
|
||||
|
||||
public class UpdatePaymentReceiveValidator : AbstractValidator<UpdatePaymentReceiveRequest>
|
||||
{
|
||||
public UpdatePaymentReceiveValidator()
|
||||
{
|
||||
RuleFor(x => x.Id).NotEmpty();
|
||||
RuleFor(x => x.InvoiceId).NotEmpty().WithMessage("Invoice reference is required");
|
||||
RuleFor(x => x.PaymentDate).NotEmpty().WithMessage("Payment date is required");
|
||||
RuleFor(x => x.PaymentAmount).GreaterThan(0).WithMessage("Amount must be greater than 0");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user