public function Serialized::validateOptionsForm

Validate the options form.

Overrides HandlerBase::validateOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Serialized.php, line 55
Definition of Drupal\views\Plugin\views\field\Serialized.

Class

Serialized
Field handler to show data of serialized fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function validateOptionsForm(&$form, &$form_state) {

  // Require a key if the format is key.
  if ($form_state['values']['options']['format'] == 'key' && $form_state['values']['options']['key'] == '') {
    form_error($form['key'], t('You have to enter a key if you want to display a key of the data.'));
  }
}