$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

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new2.46 KB

Here is a patch.

Perhaps the function which calls options_validate should be changed?

dawehner’s picture

StatusFileSize
new558 bytes

Oh this one is much better.

marcoka’s picture

Status: Needs review » Active

#2 tested with latest dev works here.

dawehner’s picture

Status: Active » Reviewed & tested by the community

Ups you probably mean RTBC.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting! commited to 7.x-3.x

dawehner’s picture

Commited as it's fixes the issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.