Fix Validation for pages under 1

- The bootstrapPages method should only be called after the validation
- Added validation to check if the $total_pages is lesser than 1