diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php
index 927f28eff4278f93e44ecd68fd0104b6154e25dd..cd78b0334c9a549252201de8523b1ae848fa9104 100644
--- a/core/.phpstan-baseline.php
+++ b/core/.phpstan-baseline.php
@@ -1805,11 +1805,6 @@
 	'count' => 2,
 	'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Variable \\$value might not be defined\\.$#',
-	'count' => 2,
-	'path' => __DIR__ . '/modules/views/src/Plugin/views/filter/NumericFilter.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Variable \\$source might not be defined\\.$#',
 	'count' => 1,
diff --git a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
index 95d27dc91b1784eb96a7c7adbe0075f4b24ce976..5d5851fab5a5feed09a025aa9ff263879c2d9c9d 100644
--- a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
+++ b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
@@ -124,12 +124,12 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
    * Tests exposed grouped filters.
    */
   public function testExposedGroupedFilters() {
-    // Expose the empty and not empty operators in a grouped filter.
-    $this->drupalGet('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $this->fieldName . '_value');
+    $filter_identifier = $this->fieldName . '_value';
+    $this->drupalGet('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $filter_identifier);
     $this->submitForm([], 'Expose filter');
     $this->submitForm([], 'Grouped filters');
 
-    // Test operators with different amount of expected values.
+    // Create groups with different amount of expected values.
     $edit = [];
     // No values are required.
     $edit['options[group_info][group_items][1][title]'] = 'empty';
@@ -162,24 +162,37 @@ public function testExposedGroupedFilters() {
     $this->drupalGet($path);
 
     // Filter the Preview by 'empty'.
-    $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption('1');
+    $this->getSession()->getPage()->findField($filter_identifier)->selectOption('1');
     $this->getSession()->getPage()->pressButton('Apply');
     $this->assertIds([4]);
 
     // Filter the Preview by 'not empty'.
-    $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption('2');
+    $this->getSession()->getPage()->findField($filter_identifier)->selectOption('2');
     $this->getSession()->getPage()->pressButton('Apply');
     $this->assertIds([1, 2, 3]);
 
     // Filter the Preview by 'less than'.
-    $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption('3');
+    $this->getSession()->getPage()->findField($filter_identifier)->selectOption('3');
     $this->getSession()->getPage()->pressButton('Apply');
     $this->assertIds([2, 3]);
 
     // Filter the Preview by 'between'.
-    $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption('4');
+    $this->getSession()->getPage()->findField($filter_identifier)->selectOption('4');
     $this->getSession()->getPage()->pressButton('Apply');
     $this->assertIds([2]);
+
+    // Change the identifier for grouped exposed filter.
+    $this->drupalGet('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $filter_identifier);
+    $filter_identifier = 'date';
+    $edit['options[group_info][identifier]'] = $filter_identifier;
+    $this->submitForm($edit, 'Apply');
+    $this->submitForm([], 'Save');
+
+    // Filter results again using a new filter identifier.
+    $this->drupalGet($path);
+    $this->getSession()->getPage()->findField($filter_identifier)->selectOption('2');
+    $this->getSession()->getPage()->pressButton('Apply');
+    $this->assertIds([1, 2, 3]);
   }
 
   /**
diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
index b87fe63dd07bec698bb4727171902edd055006d6..3dabc8a0ec1e28d645928c30cb27eacddd37461c 100644
--- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php
+++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
@@ -423,15 +423,18 @@ public function acceptExposedInput($input) {
       return TRUE;
     }
 
-    // rewrite the input value so that it's in the correct format so that
+    // Rewrite the input value so that it's in the correct format so that
     // the parent gets the right data.
-    if (!empty($this->options['expose']['identifier'])) {
-      $value = &$input[$this->options['expose']['identifier']];
-      if (!is_array($value)) {
-        $value = [
-          'value' => $value,
-        ];
-      }
+    $key = $this->isAGroup() ? 'group_info' : 'expose';
+    if (empty($this->options[$key]['identifier'])) {
+      // Invalid identifier configuration. Value can't be resolved.
+      return FALSE;
+    }
+    $value = &$input[$this->options[$key]['identifier']];
+    if (!is_array($value)) {
+      $value = [
+        'value' => $value,
+      ];
     }
 
     $rc = parent::acceptExposedInput($input);
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/filter/NumericFilterTest.php b/core/modules/views/tests/src/Unit/Plugin/views/filter/NumericFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6752f91065804878312c93a079a36e3d25f1be81
--- /dev/null
+++ b/core/modules/views/tests/src/Unit/Plugin/views/filter/NumericFilterTest.php
@@ -0,0 +1,118 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Drupal\Tests\views\Unit\Plugin\views\filter;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\views\Plugin\views\display\DisplayPluginBase;
+use Drupal\views\Plugin\views\filter\NumericFilter;
+use Drupal\views\ViewExecutable;
+
+/**
+ * @coversDefaultClass \Drupal\views\Plugin\views\filter\NumericFilter
+ * @group Views
+ */
+class NumericFilterTest extends UnitTestCase {
+
+  /**
+   * Tests the acceptExposedInput method.
+   *
+   * @covers ::acceptExposedInput
+   * @dataProvider provideAcceptExposedInput
+   */
+  public function testAcceptExposedInput($options, $value, $expected): void {
+    $plugin_definition = [
+      'title' => $this->randomMachineName(),
+    ];
+
+    $plugin = new NumericFilter([], 'numeric', $plugin_definition);
+    $translation_stub = $this->getStringTranslationStub();
+    $plugin->setStringTranslation($translation_stub);
+
+    $view = $this->prophesize(ViewExecutable::class)->reveal();
+    $display = $this->prophesize(DisplayPluginBase::class)->reveal();
+    $view->display_handler = $display;
+    $plugin->init($view, $view->display_handler, $options);
+
+    $this->assertSame($expected, $plugin->acceptExposedInput($value));
+  }
+
+  /**
+   * Data provider for testAcceptExposedInput test.
+   *
+   * @return array[]
+   *   The test cases.
+   */
+  public function provideAcceptExposedInput(): array {
+    // [$options, $value, $expected]
+    return [
+      // Not exposed by default. Bypass parsing and return true.
+      'defaults' => [[], [], TRUE],
+      'exposed but not configured' => [
+        [
+          'exposed' => TRUE,
+          'expose' => [],
+          'group_info' => [],
+        ],
+        [],
+        FALSE,
+      ],
+      // Exposed but not grouped.
+      'exposed not grouped - missing value' => [
+        [
+          'exposed' => TRUE,
+          'expose' => ['identifier' => 'test_id'],
+        ],
+        [],
+        TRUE,
+      ],
+      'exposed not grouped - wrong group config' => [
+        [
+          'exposed' => TRUE,
+          'group_info' => ['identifier' => 'test_id'],
+        ],
+        ['test_id' => ['value' => 1]],
+        // Wrong identifier configured.
+        FALSE,
+      ],
+      'exposed not grouped' => [
+        [
+          'exposed' => TRUE,
+          'expose' => ['identifier' => 'test_id'],
+        ],
+        ['test_id' => ['value' => 1]],
+        TRUE,
+      ],
+      // Exposed and grouped.
+      'exposed grouped - missing value' => [
+        [
+          'exposed' => TRUE,
+          'is_grouped' => TRUE,
+          'group_info' => ['identifier' => 'test_id'],
+        ],
+        [],
+        TRUE,
+      ],
+      'exposed grouped - wrong group config' => [
+        [
+          'exposed' => TRUE,
+          'is_grouped' => TRUE,
+          'expose' => ['identifier' => 'test_id'],
+        ],
+        ['test_id' => ['value' => 1]],
+        FALSE,
+      ],
+      'exposed grouped' => [
+        [
+          'exposed' => TRUE,
+          'is_grouped' => TRUE,
+          'group_info' => ['identifier' => 'test_id'],
+        ],
+        ['test_id' => ['value' => 1]],
+        TRUE,
+      ],
+    ];
+  }
+
+}