using FluentValidation; namespace AutobusApi.Application.Buses.Commands.CreateBus; public class CreateBusCommandValidator : AbstractValidator { public CreateBusCommandValidator() { RuleFor(v => v.Number).MinimumLength(8).MaximumLength(8); RuleFor(v => v.Model).MinimumLength(2).MaximumLength(64); RuleFor(v => v.Capacity).GreaterThan(0); } }