Validate values for pagination

This fixes #75