diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index 0072b46..a6bd6ac 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -459,10 +459,12 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { $option_values['summary_options'] = $options; } - // If the 'specify validation' checkbox is checked, reset the validation - // options. + // If the 'Specify validation criteria' checkbox is not checked, reset the + // validation options. if (empty($option_values['specify_validation'])) { $option_values['validate']['type'] = 'none'; + $option_values['validate']['options'] = array(); + $option_values['validate']['fail'] = 'not found'; } $sanitized_id = $option_values['validate']['type']; diff --git a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php b/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php index 80a1a08..93da1e7 100644 --- a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php +++ b/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php @@ -24,7 +24,7 @@ class ArgumentValidatorTest extends UITestBase { public static $testViews = array('test_argument'); /** - * Tests the Specify Validation functionality. + * Tests the 'Specify validation criteria' checkbox functionality. */ public function testSpecifyValidation() { // Specify a validation based on Node for the 'id' argument on the default @@ -35,8 +35,8 @@ public function testSpecifyValidation() { $this->assertTrue($handler['specify_validation'], 'Validation for this argument has been turned on.'); $this->assertEqual('entity:node', $handler['validate']['type'], 'Validation for the argument is based on the node.'); - // Uncheck the 'specify validation' checkbox and expect the validation type - // to be reset back to 'none'. + // Uncheck the 'Specify validation criteria' checkbox and expect the + // validation type to be reset back to 'none'. $this->saveArgumentHandlerWithValidationOptions(FALSE); $view = Views::getView('test_argument'); $handler = $view->getHandler('default', 'argument', 'id');