You are here

function gmap_plugin_style_gmapextended::options_validate in GMap Module 7

Same name and namespace in other branches
  1. 7.2 gmap_plugin_style_gmapextended.inc \gmap_plugin_style_gmapextended::options_validate()

Validate the options form.

Overrides views_plugin_style::options_validate

File

./gmap_plugin_style_gmapextended.inc, line 386
GMap style plugin.

Class

gmap_plugin_style_gmapextended
Style plugin to render a map.

Code

function options_validate(&$form, &$form_state) {
  parent::options_validate($form, $form_state);

  // Check if highlight color is a valid hex color
  if (!preg_match('/^#[a-f0-9]{6}$/i', $form_state['values']['style_options']['highlight_nodearg_color'])) {
    form_error($form['highlight_nodearg_color'], t('Highlight colour must be a valid hex code in the form #FF0000.'));
  }
}