You are here

function views_handler_field_views_system_screenshot::options_validate in Views System 7.4

Validate the options form.

Overrides views_handler::options_validate

File

views/views_handler_field_views_system_screenshot.inc, line 55
Definition of views_handler_field_views_system_screenshot.

Class

views_handler_field_views_system_screenshot
Field handler to display the thumbnail image of a theme.

Code

function options_validate(&$form, &$form_state) {
  parent::options_validate($form, $form_state);
  if ($form_state['values']['options']['image_width'] != '' && !is_numeric($form_state['values']['options']['image_width'])) {
    form_error($form['image_width'], t('You have to enter a numeric value for the image width.'));
  }
  if ($form_state['values']['options']['image_height'] != '' && !is_numeric($form_state['values']['options']['image_height'])) {
    form_error($form['image_height'], t('You have to enter a numeric value for the image height.'));
  }
}