function image_effect_scale_validate

image_effect_scale_validate($element, &$form_state)

Element validate handler to ensure that either a height or a width is specified.

File

modules/image/image.admin.inc, line 509
Administration pages for image settings.

Code

function image_effect_scale_validate($element, &$form_state) {
  if (empty($element['width']['#value']) && empty($element['height']['#value'])) {
    form_error($element, t('Width and height can not both be blank.'));
  }
}

© 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!image!image.admin.inc/function/image_effect_scale_validate/7.x