You are here

function drupagram_views_handler_field_caption::options_validate in Drupagram 7

Validate the options form.

Overrides views_handler::options_validate

File

./drupagram_views_field_handlers.inc, line 120
Drupagram views field handlers.

Class

drupagram_views_handler_field_caption
Field handler to provide simple renderer that turns a URL into a clickable link.

Code

function options_validate(&$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.'));
  }
}