You are here

function image_validate in Image 5.2

Same name and namespace in other branches
  1. 5 image.module \image_validate()

File

./image.module, line 602

Code

function image_validate($node) {
  $nid = $node->nid ? $node->nid : 'new_node';
  if (!isset($node->images[IMAGE_ORIGINAL]) && !isset($_SESSION['image_new_files'][$nid])) {
    form_set_error('image', t('You must upload an image.'));
  }
}