public function FilterPluginBase::validateExposeForm in Views (for Drupal 7) 8.3
Validate the options form.
Overrides HandlerBase::validateExposeForm
1 call to FilterPluginBase::validateExposeForm()
- FilterPluginBase::validateOptionsForm in lib/
Drupal/ views/ Plugin/ views/ filter/ FilterPluginBase.php - Simple validate handler
File
- lib/
Drupal/ views/ Plugin/ views/ filter/ FilterPluginBase.php, line 578 - Definition of Drupal\views\Plugin\views\filter\FilterPluginBase.
Class
- FilterPluginBase
- Base class for filters.
Namespace
Drupal\views\Plugin\views\filterCode
public function validateExposeForm($form, &$form_state) {
if (empty($form_state['values']['options']['expose']['identifier'])) {
form_error($form['expose']['identifier'], t('The identifier is required if the filter is exposed.'));
}
if (!empty($form_state['values']['options']['expose']['identifier']) && $form_state['values']['options']['expose']['identifier'] == 'value') {
form_error($form['expose']['identifier'], t('This identifier is not allowed.'));
}
if (!$this->view->display_handler
->isIdentifierUnique($form_state['id'], $form_state['values']['options']['expose']['identifier'])) {
form_error($form['expose']['identifier'], t('This identifier is used by another handler.'));
}
}