Files
2026-07-21 14:41:46 +07:00

17 lines
505 B
C#

using FluentValidation;
using Indotalent.Shared.Consts;
namespace Indotalent.Features.Inventory.Warehouse.Cqrs;
public class CreateWarehouseValidator : AbstractValidator<CreateWarehouseRequest>
{
public CreateWarehouseValidator()
{
RuleFor(x => x.Name)
.NotEmpty().WithMessage("Warehouse Name is required")
.MaximumLength(GlobalConsts.StringLengthShort);
RuleFor(x => x.Description)
.MaximumLength(GlobalConsts.StringLengthMedium);
}
}