14 lines
337 B
C#
14 lines
337 B
C#
using FluentValidation;
|
|
|
|
namespace AutobusApi.Application.Cities.Commands.CreateCity;
|
|
|
|
public class CreateCityCommandValidator : AbstractValidator<CreateCityCommand>
|
|
{
|
|
public CreateCityCommandValidator()
|
|
{
|
|
RuleFor(v => v.Name).MinimumLength(2).MaximumLength(64);
|
|
|
|
RuleFor(v => v.RegionId).GreaterThan(0);
|
|
}
|
|
}
|