You are here

function leaflet_views_plugin_style::options_validate in Leaflet 7

Validate the options form.

Overrides views_plugin_style::options_validate

File

leaflet_views/leaflet_views_plugin_style.inc, line 272
Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Class

leaflet_views_plugin_style
@file Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Code

function options_validate(&$form, &$form_state) {
  if (!is_numeric($form_state['values']['style_options']['height']) || $form_state['values']['style_options']['height'] < 0) {
    form_error($form['height'], t('Map height needs to be a positive number'));
  }
}