using FluentValidation;

namespace Baya.Application.Features.Geography.Commands.CreateDistrict;

public sealed class CreateDistrictCommandValidator : AbstractValidator<CreateDistrictCommand>
{
    public CreateDistrictCommandValidator()
    {
        RuleFor(x => x.CityId).GreaterThan(0);
        RuleFor(x => x.NameFa).NotEmpty().MaximumLength(150);
        RuleFor(x => x.NameEn).NotEmpty().MaximumLength(150);
    }
}
