autobus-api_old/AutobusApi.Application/Countries/Commands/UpdateCountry/UpdateCountryCommandValidator.cs

14 lines
346 B
C#

using FluentValidation;
namespace AutobusApi.Application.Countries.Commands.UpdateCountry;
public class UpdateCountryCommandValidator : AbstractValidator<UpdateCountryCommand>
{
public UpdateCountryCommandValidator()
{
RuleFor(v => v.Name).MinimumLength(2).MaximumLength(64);
RuleFor(v => v.Id).GreaterThan(0);
}
}