autobus-api_old/AutobusApi.Application/Addresses/Queries/GetAddressesWithPagination/GetAddressesWithPaginationQueryValidator.cs

14 lines
423 B
C#

using FluentValidation;
namespace AutobusApi.Application.Addresses.Queries.GetAddressesWithPagination;
public class GetAddressesWithPaginationQueryValidator : AbstractValidator<GetAddressesWithPaginationQuery>
{
public GetAddressesWithPaginationQueryValidator()
{
RuleFor(v => v.PageNumber).GreaterThanOrEqualTo(1);
RuleFor(v => v.PageSize).GreaterThanOrEqualTo(1).LessThanOrEqualTo(50);
}
}