diff -u b/core/modules/views/src/Plugin/views/pager/Some.php b/core/modules/views/src/Plugin/views/pager/Some.php --- b/core/modules/views/src/Plugin/views/pager/Some.php +++ b/core/modules/views/src/Plugin/views/pager/Some.php @@ -42,12 +42,14 @@ $form['items_per_page'] = array( '#title' => $pager_text['items per page title'], '#type' => 'number', + '#min' => 0, '#description' => $pager_text['items per page description'], '#default_value' => $this->options['items_per_page'], ); $form['offset'] = array( '#type' => 'number', + '#min' => 0, '#title' => $this->t('Offset (number of items to skip)'), '#description' => $this->t('For example, set this to 3 and the first 3 items will not be displayed.'), '#default_value' => $this->options['offset'], only in patch2: unchanged: --- a/core/modules/views/src/Plugin/views/pager/SqlBase.php +++ b/core/modules/views/src/Plugin/views/pager/SqlBase.php @@ -47,12 +47,14 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['items_per_page'] = array( '#title' => $pager_text['items per page title'], '#type' => 'number', + '#min' => 0, '#description' => $pager_text['items per page description'], '#default_value' => $this->options['items_per_page'], ); $form['offset'] = array( '#type' => 'number', + '#min' => 0, '#title' => $this->t('Offset (number of items to skip)'), '#description' => $this->t('For example, set this to 3 and the first 3 items will not be displayed.'), '#default_value' => $this->options['offset'], @@ -67,6 +69,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['total_pages'] = array( '#type' => 'number', + '#min' => 0, '#title' => $this->t('Number of pages'), '#description' => $this->t('Leave empty to show all pages.'), '#default_value' => $this->options['total_pages'],