You are here

function video_thumbnail_validate in Video 7

Element specific validation for video thumbnail value.

1 string reference to 'video_thumbnail_validate'
video_thumb_process in ./video.module

File

./video.field.inc, line 477
Implement an video field, based on the file module's file field.

Code

function video_thumbnail_validate($element, &$form_state) {
  $fid = $element['#value'];

  // Make the file permanent and store it in the form.
  if (!empty($fid)) {
    $file = file_load($fid);
    $file->status |= FILE_STATUS_PERMANENT;
    $file = file_save($file);

    //    $element['#value'] = (array) $file;
  }
}