autobus-api_old/AutobusApi.Application/Cities/Queries/GetCitiesWithPagination/GetCitiesWithPaginationQueryValidator.cs

14 lines
408 B
C#

using FluentValidation;
namespace AutobusApi.Application.Cities.Queries.GetCitiesWithPagination;
public class GetCitiesWithPaginationQueryValidator : AbstractValidator<GetCitiesWithPaginationQuery>
{
public GetCitiesWithPaginationQueryValidator()
{
RuleFor(v => v.PageNumber).GreaterThanOrEqualTo(1);
RuleFor(v => v.PageSize).GreaterThanOrEqualTo(1).LessThanOrEqualTo(50);
}
}