14 lines
423 B
C#
14 lines
423 B
C#
using FluentValidation;
|
|
|
|
namespace AutobusApi.Application.Companies.Queries.GetCompaniesWithPagination;
|
|
|
|
public class GetCompaniesWithPaginationQueryValidator : AbstractValidator<GetCompaniesWithPaginationQuery>
|
|
{
|
|
public GetCompaniesWithPaginationQueryValidator()
|
|
{
|
|
RuleFor(v => v.PageNumber).GreaterThanOrEqualTo(1);
|
|
|
|
RuleFor(v => v.PageSize).GreaterThanOrEqualTo(1).LessThanOrEqualTo(50);
|
|
}
|
|
}
|