You are here

function flipping_book_management_form_validate in Flipping Book 7

Validation callback.

See also

flipping_book_management_form()

File

includes/flipping_book.pages.inc, line 71
Flipping Book Pages.

Code

function flipping_book_management_form_validate($form, &$form_state) {
  $file = file_save_upload('fb', array(
    'file_validate_extensions' => array(
      'zip',
    ),
  ));
  if ($file) {
    $form_state['values']['fb'][0]['file'] = $file;
  }
  else {
    form_set_error('file', t('No file was uploaded.'));
  }
}