add validation for pagination page number