function image_gd_settings_validate in Drupal 6
Same name and namespace in other branches
- 7 modules/system/image.gd.inc \image_gd_settings_validate()
Validate the submitted GD settings.
Related topics
1 string reference to 'image_gd_settings_validate'
- image_gd_settings in includes/
image.gd.inc - Retrieve settings for the GD2 toolkit.
File
- 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.'));
}
}