You are here

public function Serialized::validateOptionsForm in Views (for Drupal 7) 8.3

Validate the options form.

Overrides HandlerBase::validateOptionsForm

File

lib/Drupal/views/Plugin/views/field/Serialized.php, line 57
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.'));
  }
}