image_effect_scale_validate

Versions
7
image_effect_scale_validate($element, &$form_state)

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

Code

modules/image/image.admin.inc, line 479

<?php
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.'));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.