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