classlib/ExpenseTracker.Application/Accounts/Queries/GetWithPagination/GetAccountsWithPaginationQueryValidator.cs
2024-08-07 21:12:02 +03:00

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);
}
}