17 lines
453 B
C#
17 lines
453 B
C#
using FluentValidation;
|
|
|
|
namespace ExpenseTracker.Application.Accounts.Queries.GetWithPagination;
|
|
|
|
public class GetAccountsWithPaginationQueryValidator : AbstractValidator<GetAccountsWithPaginationQuery>
|
|
{
|
|
public GetAccountsWithPaginationQueryValidator()
|
|
{
|
|
RuleFor(v => v.PageNumber)
|
|
.GreaterThanOrEqualTo(1);
|
|
|
|
RuleFor(v => v.PageSize)
|
|
.GreaterThanOrEqualTo(1)
|
|
.LessThanOrEqualTo(50);
|
|
}
|
|
}
|