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);
    }
}