Same name and namespace in other branches
- 7.x-3.x contrib/views_slideshow_cycle/views_slideshow_cycle.views_slideshow.inc \views_slideshow_cycle_views_slideshow_options_form_validate() 1 comment
Implements hook_views_slideshow_options_form_validate().
File
-
modules/
views_slideshow_cycle/ views_slideshow_cycle.module, line 541
Code
function views_slideshow_cycle_views_slideshow_options_form_validate(&$form, FormStateInterface &$form_state, &$view) {
if (!is_numeric($form_state->getValue(array(
'style_options',
'views_slideshow_cycle',
'timeout',
)))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][timeout', t('!setting must be numeric!', array(
'!setting' => t('Timeout'),
)));
}
if (!is_numeric($form_state->getValue(array(
'style_options',
'views_slideshow_cycle',
'speed',
)))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][speed', t('!setting must be numeric!', array(
'!setting' => t('Speed'),
)));
}
if (!is_numeric($form_state->getValue(array(
'style_options',
'views_slideshow_cycle',
'remember_slide_days',
)))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][remember_slide_days', t('!setting must be numeric!', array(
'!setting' => t('Slide days'),
)));
}
}