public function gmap_plugin_style_gmap::options_validate in GMap Module 7.2
Same name and namespace in other branches
- 6.2 gmap_plugin_style_gmap.inc \gmap_plugin_style_gmap::options_validate()
- 6 gmap_plugin_style_gmap.inc \gmap_plugin_style_gmap::options_validate()
- 7 gmap_plugin_style_gmap.inc \gmap_plugin_style_gmap::options_validate()
Validate the options form.
Overrides views_plugin_style::options_validate
File
- ./
gmap_plugin_style_gmap.inc, line 613 - GMap style plugin.
Class
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.'));
}
}