function image_gd_settings_validate
image_gd_settings_validate($form, &$form_state)
Validate the submitted GD settings.
Related topics
File
- modules/system/image.gd.inc, line 44
- 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.')); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!image.gd.inc/function/image_gd_settings_validate/7.x