You are here

function fillpdf_forms_admin_validate in FillPDF 7.2

Same name and namespace in other branches
  1. 7 fillpdf.admin.inc \fillpdf_forms_admin_validate()

Makes sure the Upload was provided (want to validate .pdf here too)

File

./fillpdf.admin.inc, line 82
Allows mappings of PDFs to site content

Code

function fillpdf_forms_admin_validate($form, &$form_state) {

  // uploading anything?
  $file = $_FILES['files']['name']['upload_pdf'];
  if (!$file) {
    form_set_error('url', t('A PDF must be provided.'));
  }
  $validate_file = _fillpdf_validate_upload($file);
  if (isset($validate_file['#error'])) {
    form_set_error('url', $validate_file['#message']);
  }
}