You are here

public function gmap_plugin_style_gmapextended::options_validate in GMap Module 7.2

Same name and namespace in other branches
  1. 7 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 400
GMap style plugin.

Class

gmap_plugin_style_gmapextended

Code

public 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.'));
  }
}