function image_gd_settings_validate

7.x image.gd.inc image_gd_settings_validate($form, &$form_state)
6.x image.gd.inc image_gd_settings_validate($form, &$form_state)

Validate the submitted GD settings.

Related topics

1 string reference to 'image_gd_settings_validate'
image_gd_settings in drupal-6.x/includes/image.gd.inc
Retrieve settings for the GD2 toolkit.

File

drupal-6.x/includes/image.gd.inc, line 52
GD2 toolkit for image manipulation within Drupal.

Code

function image_gd_settings_validate($form, &$form_state) {
  // Validate image quality range.
  $value = $form_state['values']['image_jpeg_quality'];
  if (!is_numeric($value) || $value < 0 || $value > 100) {
    form_set_error('image_jpeg_quality', t('JPEG quality must be a number between 0 and 100.'));
  }
}