function image_gd_settings_validate

Validate the submitted GD settings.

Related topics

1 string reference to 'image_gd_settings_validate'
image_gd_settings in modules/system/image.gd.inc
Retrieve settings for the GD2 toolkit.

File

modules/system/image.gd.inc, line 44

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.'));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.