Files
BackOffice.BFF/src/BackOffice.BFF.Application/ManualPaymentCQ/Commands/CreateManualPayment/CreateManualPaymentCommandValidator.cs
T
masoodafar-web fe56b8f139
Build and Deploy / build (push) Successful in 2m18s
feat: add GetAvailableWeeks query and update protobuf imports
2025-12-12 05:57:32 +03:30

25 lines
808 B
C#

namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.CreateManualPayment;
public class CreateManualPaymentCommandValidator : AbstractValidator<CreateManualPaymentCommand>
{
public CreateManualPaymentCommandValidator()
{
RuleFor(x => x.UserId)
.GreaterThan(0)
.WithMessage("شناسه کاربر باید بزرگتر از صفر باشد.");
RuleFor(x => x.Amount)
.GreaterThan(0)
.WithMessage("مبلغ باید بزرگتر از صفر باشد.");
RuleFor(x => x.Description)
.NotEmpty()
.WithMessage("توضیحات الزامی است.");
RuleFor(x => x.Type)
.GreaterThan(0)
.WithMessage("نوع پرداخت دستی نامعتبر است.");
}
}