You are here

function fullcalendar_plugin_style_fullcalendar::validate in FullCalendar 7.2

Validate that the plugin is correct and can be saved.

Return value

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

Overrides views_plugin_style::validate

File

includes/views/plugins/fullcalendar_plugin_style_fullcalendar.inc, line 161
Contains the FullCalendar style plugin.

Class

fullcalendar_plugin_style_fullcalendar
@file Contains the FullCalendar style plugin.

Code

function validate() {
  if ($this->display->display_plugin != 'default') {

    // Get the date fields.
    $date_fields = $this
      ->fullcalendar_parse_fields();
    if (empty($date_fields)) {
      drupal_set_message(t('Display "@display" requires at least one date field.', array(
        '@display' => $this->display->display_title,
      )), 'error');
    }
  }
  return parent::validate();
}