autobus-api_old/AutobusApi.Application/Buses/Queries/GetBusesWithPagination/GetBusesWithPaginationQueryValidator.cs

14 lines
403 B
C#

using FluentValidation;
namespace AutobusApi.Application.Buses.Queries.GetBusesWithPagination;
public class GetBusesWithPaginationQueryValidator : AbstractValidator<GetBusesWithPaginationQuery>
{
public GetBusesWithPaginationQueryValidator()
{
RuleFor(v => v.PageNumber).GreaterThanOrEqualTo(1);
RuleFor(v => v.PageSize).GreaterThanOrEqualTo(1).LessThanOrEqualTo(50);
}
}