Same name and namespace in other branches
  1. 8.x-3.x views_slideshow.api.inc \hook_views_slideshow_options_form_validate()

Form validation callback for the slideshow settings.

Sujets associés

1 function implements hook_views_slideshow_options_form_validate()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

views_slideshow_cycle_views_slideshow_options_form_validate dans contrib/views_slideshow_cycle/views_slideshow_cycle.views_slideshow.inc
Implements hook_views_slideshow_options_form_validate().
1 invocation of hook_views_slideshow_options_form_validate()
views_slideshow_plugin_style_slideshow::options_validate dans ./views_slideshow_plugin_style_slideshow.inc
Run any validation on the form settings.

Fichier

./views_slideshow.api.php, line 91

Code

function hook_views_slideshow_options_form_validate(&$form, &$form_state, &$view) {
    if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['speed'])) {
        form_error($form['views_slideshow_cycle']['speed'], t('!setting must be numeric!', array(
            '!setting' => 'Speed',
        )));
    }
    if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['timeout'])) {
        form_error($form['views_slideshow_cycle']['timeout'], t('!setting must be numeric!', array(
            '!setting' => 'Timeout',
        )));
    }
    if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['remember_slide_days'])) {
        form_error($form['views_slideshow_cycle']['remember_slide_days'], t('!setting must be numeric!', array(
            '!setting' => 'Slide days',
        )));
    }
}