autobus-api_old/AutobusApi.Application/Cities/Commands/UpdateCity/UpdateCityCommandValidator.cs

16 lines
381 B
C#

using FluentValidation;
namespace AutobusApi.Application.Cities.Commands.UpdateCity;
public class UpdateCityCommandValidator : AbstractValidator<UpdateCityCommand>
{
public UpdateCityCommandValidator()
{
RuleFor(v => v.Name).MinimumLength(2).MaximumLength(64);
RuleFor(v => v.Id).GreaterThan(0);
RuleFor(v => v.RegionId).GreaterThan(0);
}
}