You are here

public function FilterPluginBase::validate in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::validate()

Validate that the plugin is correct and can be saved.

Return value

An array of error strings to tell the user what is wrong with this plugin.

Overrides HandlerBase::validate

2 calls to FilterPluginBase::validate()
Combine::validate in core/modules/views/src/Plugin/views/filter/Combine.php
Validate that the plugin is correct and can be saved.
InOperator::validate in core/modules/views/src/Plugin/views/filter/InOperator.php
Validate that the plugin is correct and can be saved.
2 methods override FilterPluginBase::validate()
Combine::validate in core/modules/views/src/Plugin/views/filter/Combine.php
Validate that the plugin is correct and can be saved.
InOperator::validate in core/modules/views/src/Plugin/views/filter/InOperator.php
Validate that the plugin is correct and can be saved.

File

core/modules/views/src/Plugin/views/filter/FilterPluginBase.php, line 1649

Class

FilterPluginBase
Base class for Views filters handler plugins.

Namespace

Drupal\views\Plugin\views\filter

Code

public function validate() {
  if (!empty($this->options['exposed']) && ($error = $this
    ->validateIdentifier($this->options['expose']['identifier']))) {
    return [
      $error,
    ];
  }
}