Files
blazor-wms/Features/Inventory/TransferOut/Cqrs/UpdateTransferOutValidator.cs
T
2026-07-21 14:41:46 +07:00

14 lines
575 B
C#

using FluentValidation;
namespace Indotalent.Features.Inventory.TransferOut.Cqrs;
public class UpdateTransferOutValidator : AbstractValidator<UpdateTransferOutRequest>
{
public UpdateTransferOutValidator()
{
RuleFor(x => x.Id).NotEmpty();
RuleFor(x => x.WarehouseFromId).NotEmpty().WithMessage("Source warehouse is required");
RuleFor(x => x.WarehouseToId).NotEmpty().WithMessage("Destination warehouse is required")
.NotEqual(x => x.WarehouseFromId).WithMessage("Source and Destination warehouse cannot be the same");
}
}