All checks were successful
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 7m8s
26 lines
965 B
C#
26 lines
965 B
C#
namespace CMSMicroservice.Application.ManualPaymentCQ.Commands.ProcessManualMembershipPayment;
|
|
|
|
public class ProcessManualMembershipPaymentCommandValidator : AbstractValidator<ProcessManualMembershipPaymentCommand>
|
|
{
|
|
public ProcessManualMembershipPaymentCommandValidator()
|
|
{
|
|
RuleFor(x => x.UserId)
|
|
.GreaterThan(0)
|
|
.WithMessage("شناسه کاربر معتبر نیست");
|
|
|
|
RuleFor(x => x.Amount)
|
|
.GreaterThan(0)
|
|
.WithMessage("مبلغ باید بزرگتر از صفر باشد");
|
|
|
|
RuleFor(x => x.ReferenceNumber)
|
|
.NotEmpty()
|
|
.WithMessage("شماره مرجع الزامی است")
|
|
.MaximumLength(50)
|
|
.WithMessage("شماره مرجع نباید بیشتر از 50 کاراکتر باشد");
|
|
|
|
RuleFor(x => x.AdminUserId)
|
|
.GreaterThan(0)
|
|
.WithMessage("شناسه ادمین معتبر نیست");
|
|
}
|
|
}
|