$form is empty inside options_validate($form, &$form_state) making it impossible to set error messages.
function options_validate($form, &$form_state) {
dpm($form);
parent::options_validate($form, $form_state);
$options = &$form_state['values']['style_options'];
if (!is_numeric($options['max_width'])) {
form_error($form['max_width'], t('Please specify a numerical value for Max Width'));
}
if (!is_numeric($options['min_width'])) {
form_error($form['min_width'], t('Please specify a numerical value for Min Width'));
}
if (!is_numeric($options['animate_in'])) {
form_error($form['animate_in'], t('Please specify a numerical value for Animate In'));
}
if (!is_numeric($options['animate_out'])) {
form_error($form['animate_out'], t('Please specify a numerical value for Animate Out'));
}
if (!is_numeric($options['activated_item'])) {
form_error($form['activated_item'], t('Please specify a numerical value for Activated Item'));
}
}
}
Comments
Comment #1
dawehnerHere is a patch.
Perhaps the function which calls options_validate should be changed?
Comment #2
dawehnerOh this one is much better.
Comment #3
marcoka commented#2 tested with latest dev works here.
Comment #4
dawehnerUps you probably mean RTBC.
Comment #5
dawehnerThanks for reporting! commited to 7.x-3.x
Comment #6
dawehnerCommited as it's fixes the issue.